[PATCH 3 of 8] graphlog: support changeset identifiers in --branch

Patrick Mezard patrick at mezard.eu
Wed Apr 11 05:08:40 CDT 2012


# HG changeset patch
# User Patrick Mezard <patrick at mezard.eu>
# Date 1334135846 -7200
# Node ID 82b1bd4e27864470a1bfef3a2736367091266465
# Parent  2471ec1dcf6f3ec1e624c3f34ee0ac34e4dfbb7a
graphlog: support changeset identifiers in --branch

diff --git a/hgext/graphlog.py b/hgext/graphlog.py
--- a/hgext/graphlog.py
+++ b/hgext/graphlog.py
@@ -306,6 +306,7 @@
     # branch and only_branch are really aliases and must be handled at
     # the same time
     opts['branch'] = opts.get('branch', []) + opts.get('only_branch', [])
+    opts['branch'] = [repo.lookupbranch(b) for b in opts['branch']]
     # pats/include/exclude are passed to match.match() directly in
     # _matchfile() revset but walkchangerevs() builds its matcher with
     # scmutil.match(). The difference is input pats are globbed on
diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -1464,7 +1464,7 @@
   abort: unknown revision 'not-a-branch'!
   abort: unknown revision 'not-a-branch'!
   abort: unknown revision 'not-a-branch'!
-  $ testlog -b default -b branch --only-branch branch
+  $ testlog -b 35 -b 36 --only-branch branch
   []
   (group
     (group


More information about the Mercurial-devel mailing list