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

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


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

diff --git a/hgext/graphlog.py b/hgext/graphlog.py
--- a/hgext/graphlog.py
+++ b/hgext/graphlog.py
@@ -257,7 +257,7 @@
         'branch':      ('branch($)', ' or '),
         'exclude':     ('not file($)', ' and '),
         'include':     ('file($)', ' and '),
-        'keyword':     ('keyword($)', ' and '),
+        'keyword':     ('keyword($)', ' or '),
         'prune':       ('not ($ or ancestors($))', ' and '),
         'user':        ('user($)', ' or '),
         }
diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -1435,8 +1435,8 @@
   abort: unknown revision 'not-a-branch'!
   $ testlog -b default -b branch --only-branch branch
   ('group', ('group', ('or', ('or', ('func', ('symbol', 'branch'), ('string', 'default')), ('func', ('symbol', 'branch'), ('string', 'branch'))), ('func', ('symbol', 'branch'), ('string', 'branch')))))
-  $ hg log -G --print-revset -k 'something' -k 'nice'
-  ('group', ('group', ('and', ('func', ('symbol', 'keyword'), ('string', 'something')), ('func', ('symbol', 'keyword'), ('string', 'nice')))))
+  $ testlog -k expand -k merge
+  ('group', ('group', ('or', ('func', ('symbol', 'keyword'), ('string', 'expand')), ('func', ('symbol', 'keyword'), ('string', 'merge')))))
   $ hg log -G --include 'some file' --exclude 'another file'
   $ hg log -G --follow  --template 'nodetag {rev}\n' | grep nodetag | wc -l
   \s*36 (re)



More information about the Mercurial-devel mailing list