[PATCH 3 of 6 STABLE v2] graphlog: multiple --user must be or'ed

Patrick Mezard patrick at mezard.eu
Wed Feb 22 11:31:34 UTC 2012


# HG changeset patch
# User Patrick Mezard <patrick at mezard.eu>
# Date 1329910215 -3600
# Branch stable
# Node ID 8e8f128d12d41157c4fb8df720527a162daf966d
# Parent  a44b243f7f52b9ba2ae9edb08cebb0f022b345a3
graphlog: multiple --user must be or'ed

diff --git a/hgext/graphlog.py b/hgext/graphlog.py
--- a/hgext/graphlog.py
+++ b/hgext/graphlog.py
@@ -260,7 +260,7 @@
         'keyword':     ('keyword($)', ' and '),
         'only_branch': ('branch($)', ' and '),
         'prune':       ('not ($ or ancestors($))', ' and '),
-        'user':        ('user($)', ' and '),
+        'user':        ('user($)', ' or '),
         }
     optrevset = []
     revset = []
diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -1414,7 +1414,17 @@
 
 Test log -G options
 
-  $ hg log -G -u 'something nice'
+  $ testlog() {
+  >   hg log -G --print-revset "$@"
+  >   hg log --template 'nodetag {rev}\n' "$@" | grep nodetag \
+  >     | sed 's/.*nodetag/nodetag/' > log.nodes
+  >   hg log -G --template 'nodetag {rev}\n' "$@" | grep nodetag \
+  >     | sed 's/.*nodetag/nodetag/' > glog.nodes
+  >   diff -u log.nodes glog.nodes
+  > }
+
+  $ testlog -u test -u not-a-user
+  ('group', ('group', ('or', ('func', ('symbol', 'user'), ('string', 'test')), ('func', ('symbol', 'user'), ('string', 'not-a-user')))))
   $ hg log -G -b 'something nice'
   abort: unknown revision 'something nice'!
   [255]



More information about the Mercurial-devel mailing list