I guess this is really 2 questions:
- How do I get an update hook to execute the following:
hg heads --template 'version {tags}\tbuild {rev}.{node|short}\tcommitted on {date|shortdate}'
Simply putting: update = <above command> in the [hooks] section of the hgrc file, doesn't seem to work.
- How do I redirect output from the above to a text file? Appending
> log.txtor| log.txtdoesn't work at all
I'm sure this is really basic and my command line knowledge is really basic - I just learned all of the above command this morning!
BTW, if it helps, I am running TortoiseHg 2.6.1 with Mercurial 2.4.1
i,e you can't write
hg COMMANDdirectly in [hooks] section, but can write yjis command in shell-script, which in called in hook. Something likewith
updatehook.sh|updatehook.batin PATH (or with full path to script), in which you have as main part(note added
\nat the end of template - for multi-head repository it's needed)