commit: drop unused "vdirs" argument from repo.checkcommitpatterns()
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 15 Nov 2019 14:47:31 -0800
changeset 43712 f965b1027fb0
parent 43711 7f443cce2972
child 43713 95d2eab0a7b9
commit: drop unused "vdirs" argument from repo.checkcommitpatterns() Differential Revision: https://phab.mercurial-scm.org/D7438
mercurial/cmdutil.py
mercurial/interfaces/repository.py
mercurial/localrepo.py
--- a/mercurial/cmdutil.py	Fri Nov 15 14:41:00 2019 -0800
+++ b/mercurial/cmdutil.py	Fri Nov 15 14:47:31 2019 -0800
@@ -427,9 +427,7 @@
 
         force = opts.get(b'force')
         if not force:
-            vdirs = []
             match = matchmod.badmatch(match, fail)
-            match.explicitdir = vdirs.append
 
         status = repo.status(match=match)
 
@@ -457,7 +455,7 @@
                     raise error.Abort(dirtyreason)
 
         if not force:
-            repo.checkcommitpatterns(wctx, vdirs, match, status, fail)
+            repo.checkcommitpatterns(wctx, match, status, fail)
         diffopts = patch.difffeatureopts(
             ui,
             opts=opts,
--- a/mercurial/interfaces/repository.py	Fri Nov 15 14:41:00 2019 -0800
+++ b/mercurial/interfaces/repository.py	Fri Nov 15 14:47:31 2019 -0800
@@ -1746,7 +1746,7 @@
     def currentwlock():
         """Return the wlock if it's held or None."""
 
-    def checkcommitpatterns(wctx, vdirs, match, status, fail):
+    def checkcommitpatterns(wctx, match, status, fail):
         pass
 
     def commit(
--- a/mercurial/localrepo.py	Fri Nov 15 14:41:00 2019 -0800
+++ b/mercurial/localrepo.py	Fri Nov 15 14:47:31 2019 -0800
@@ -2789,7 +2789,7 @@
 
         return fparent1
 
-    def checkcommitpatterns(self, wctx, vdirs, match, status, fail):
+    def checkcommitpatterns(self, wctx, match, status, fail):
         """check for commit arguments that aren't committable"""
         if match.isexact() or match.prefix():
             matched = set(status.modified + status.added + status.removed)
@@ -2838,8 +2838,6 @@
             match = matchmod.always()
 
         if not force:
-            vdirs = []
-            match.explicitdir = vdirs.append
             match.bad = fail
 
         # lock() for recent changelog (see issue4368)
@@ -2868,7 +2866,7 @@
 
             # make sure all explicit patterns are matched
             if not force:
-                self.checkcommitpatterns(wctx, vdirs, match, status, fail)
+                self.checkcommitpatterns(wctx, match, status, fail)
 
             cctx = context.workingcommitctx(
                 self, status, text, user, date, extra