hgext/graphlog.py
changeset 16157 4a828d3bc04a
parent 16150 0424f3c7d7ac
child 16158 e04cc21b01b2
--- a/hgext/graphlog.py	Wed Feb 22 17:41:22 2012 -0600
+++ b/hgext/graphlog.py	Thu Feb 23 11:21:04 2012 +0100
@@ -258,10 +258,16 @@
         'exclude':     ('not file($)', ' and '),
         'include':     ('file($)', ' and '),
         'keyword':     ('keyword($)', ' or '),
-        'only_branch': ('branch($)', ' and '),
         'prune':       ('not ($ or ancestors($))', ' and '),
         'user':        ('user($)', ' or '),
         }
+
+    # branch and only_branch are really aliases and must be handled at
+    # the same time
+    if 'branch' in opts and 'only_branch' in opts:
+        opts = dict(opts)
+        opts['branch'] = opts['branch'] + opts.pop('only_branch')
+
     optrevset = []
     revset = []
     for op, val in opts.iteritems():