[PATCH 1 of 3] revset: make matching keyword not match summary when matching for description

Angel Ezquerra angel.ezquerra at gmail.com
Fri Apr 13 18:42:10 CDT 2012


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1334316945 -7200
# Node ID d10a02263e0c5197e3b7c5d3c10f713cfb3c7387
# Parent  31202dfd3eda5b4c1ae2e07c56d23af8f7e6d48e
revset: make matching keyword not match summary when matching for description

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -944,6 +944,9 @@
                 field = 'user'
             fields.append(field)
     fields = set(fields)
+    if 'summary' in fields and 'description' in fields:
+        # If a revision matches its description it also matches its summary
+        fields.discard('summary')
 
     # We may want to match more than one field
     # Each field will be matched with its own "getfield" function


More information about the Mercurial-devel mailing list