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

Patrick Mezard patrick at mezard.eu
Sat Feb 18 13:57:43 CST 2012


# HG changeset patch
# User Patrick Mezard <patrick at mezard.eu>
# Date 1329594705 -3600
# Branch stable
# Node ID 49a75add6b588fcd26b95c781f6a0462bc6aa6c4
# Parent  4d3e74fde3af20333b89547ba2e9cdb3f72e7b10
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
@@ -1417,8 +1417,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