changeset 16148:184cc3c3e0a6

graphlog: multiple --user must be or'ed
author Patrick Mezard <patrick@mezard.eu>
date Wed, 22 Feb 2012 12:30:15 +0100
parents 5607d829bf17
children 6acbbb0c7381
files hgext/graphlog.py tests/test-glog.t
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/graphlog.py	Wed Feb 22 12:30:15 2012 +0100
+++ b/hgext/graphlog.py	Wed Feb 22 12:30:15 2012 +0100
@@ -260,7 +260,7 @@
         'keyword':     ('keyword($)', ' and '),
         'only_branch': ('branch($)', ' and '),
         'prune':       ('not ($ or ancestors($))', ' and '),
-        'user':        ('user($)', ' and '),
+        'user':        ('user($)', ' or '),
         }
     optrevset = []
     revset = []
--- a/tests/test-glog.t	Wed Feb 22 12:30:15 2012 +0100
+++ b/tests/test-glog.t	Wed Feb 22 12:30:15 2012 +0100
@@ -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]