D5926: match: allow passing in badfn to always() and never()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

D5926: match: allow passing in badfn to always() and never()

pulkit (Pulkit Goyal)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  So that no callers are required to access the matchers themselves.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5926

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -194,11 +194,11 @@
 def exact(root, cwd, files, badfn=None):
     return exactmatcher(root, cwd, files, badfn=badfn)
 
-def always(root, cwd):
-    return alwaysmatcher(root, cwd)
+def always(root, cwd, badfn=None):
+    return alwaysmatcher(root, cwd, badfn=badfn)
 
-def never(root, cwd):
-    return nevermatcher(root, cwd)
+def never(root, cwd, badfn=None):
+    return nevermatcher(root, cwd, badfn=badfn)
 
 def badmatch(match, badfn):
     """Make a copy of the given matcher, replacing its bad method with the given



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D5926: match: allow passing in badfn to always() and never()

pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc302218a2528: match: allow passing in badfn to always() and never() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5926?vs=14014&id=14019

REVISION DETAIL
  https://phab.mercurial-scm.org/D5926

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -194,11 +194,11 @@
 def exact(root, cwd, files, badfn=None):
     return exactmatcher(root, cwd, files, badfn=badfn)
 
-def always(root, cwd):
-    return alwaysmatcher(root, cwd)
+def always(root, cwd, badfn=None):
+    return alwaysmatcher(root, cwd, badfn=badfn)
 
-def never(root, cwd):
-    return nevermatcher(root, cwd)
+def never(root, cwd, badfn=None):
+    return nevermatcher(root, cwd, badfn=badfn)
 
 def badmatch(match, badfn):
     """Make a copy of the given matcher, replacing its bad method with the given



To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel