Please add a -r argument to hg branch for showing the branch of a revision besides the current revision. This would be easier than the alternatives below and I suspect it would be would be a simple addition. I think hg branch is also a natural place to look for the functionality of checking the branch of a changeset. The current alternatives I can think of: 1. hg log -r rev --template '{branch}\n' 2. (or if the working directory is clean) hg log -r . (copy the revision hash) hg up rev hg branch hg up oldrev
This is a good idea. I would like to take this up. But, there exists an experimental option `r` which changes the branch of the changesets.
I've done it via `-s` option here https://phab.mercurial-scm.org/D5475. Please see
The two does not conflicts: hg branch --rev X branchname → update the branch on the changeset hg branch --rev X → display the name on the changeset
I'd want to suggest we not use -s here — to keep consistency with other commands that select a revision with -r / --rev. (And I do agree with Boris that this dovetails with changing the branch of the changeset -- in both cases, you're selecting a revision, whether that's to display or make a change.)
As suggested by @yuja, I added the `-r` option in the branches command. See https://phab.mercurial-scm.org/D5477.
Fixed by https://mercurial-scm.org/repo/hg/rev/4506f801e492 Navaneeth Suresh <navaneeths1998@gmail.com> branches: add -r option to show branch name(s) of a given rev (issue5948) Differential Revision: https://phab.mercurial-scm.org/D5486 (please test the fix)
Bug was set to TESTING for 7 days, resolving