[PATCH 2 of 2 STABLE] revset: pass in lookup function to matchany() (issue5879)

Yuya Nishihara yuya at tcha.org
Fri May 11 07:19:57 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1526037022 -32400
#      Fri May 11 20:10:22 2018 +0900
# Branch stable
# Node ID edb28a6d95b73079a7dd6f8cf0486a8e5a3d9fac
# Parent  69381a28b45640fef484e71482a5896ebe5ad163
revset: pass in lookup function to matchany() (issue5879)

Silly mistake in f83cb91b052e.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2171,7 +2171,7 @@ def lookupfn(repo):
 
 def match(ui, spec, lookup=None):
     """Create a matcher for a single revision spec"""
-    return matchany(ui, [spec], lookup=None)
+    return matchany(ui, [spec], lookup=lookup)
 
 def matchany(ui, specs, lookup=None, localalias=None):
     """Create a matcher that will include any revisions matching one of the
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -1237,7 +1237,30 @@ Revset query with foo-bar bookmark (issu
   # HG changesets search
   # Node ID cad8025a2e87f88c06259790adfa15acb4080123
   # Query "some-thing%anotherthing"
-  # Mode literal keyword search
+  # Mode revset expression search
+  
+  changeset:   cad8025a2e87f88c06259790adfa15acb4080123
+  revision:    3
+  user:        test
+  date:        Thu, 01 Jan 1970 00:00:00 +0000
+  summary:     branch commit with null character: \x00 (esc)
+  branch:      unstable
+  tag:         tip
+  bookmark:    some-thing
+  
+  changeset:   1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
+  revision:    2
+  user:        test
+  date:        Thu, 01 Jan 1970 00:00:00 +0000
+  summary:     branch
+  branch:      stable
+  
+  changeset:   a4f92ed23982be056b9852de5dfe873eaac7f0de
+  revision:    1
+  user:        test
+  date:        Thu, 01 Jan 1970 00:00:00 +0000
+  summary:     Added tag 1.0 for changeset 2ef0ac749a14
+  branch:      default
   
   
 


More information about the Mercurial-devel mailing list