Question

So we work in "named" branches with what we do, but it's now come to light that this "name" we use should also be used in the commit message to help with tracking etc.

If we're using TortoiseHG or Mercurial, is there a way to automatically append/preappend the brnachname to the commit message?

I've looked around and can't find anything that matches exactly what we need :(

So for example:

hg commit "did a change" in the "RR-3498" branch will become something like

"RR-3498 did a change"

or

"did a change RR-3498"

Thanks

No correct solution

OTHER TIPS

this "name" we use should also be used in the commit message

Branch name must NOT be used (I can not emphasize more strongly here) in commit message - it's redundant, duplicate information, which require additional actions for extracting from log message for processing

Branch-name in Mercurial is permanent meta-data, always stored in each changeset.

If you use Mercurial for "tracking", then the most of usable commands (I can imagine only hg log for now) are templateable, and you can output branch name easy. If you use some external tool, you can on preparing data for it from Mercurial combine "clean" commit-message and branch-name of changesets

Don't forget about MYOB principle

You can write a hook for this. That said, this requirement sounds like from a pointed-hair manager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top