Patchwork D7438: commit: drop unused "vdirs" argument from repo.checkcommitpatterns()

login
register
mail settings
Submitter phabricator
Date Nov. 16, 2019, 12:35 a.m.
Message ID <differential-rev-PHID-DREV-24wre5zlshydlrl4fjdh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43293/
State Superseded
Headers show

Comments

phabricator - Nov. 16, 2019, 12:35 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/interfaces/repository.py
  mercurial/localrepo.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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
diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py
--- a/mercurial/interfaces/repository.py
+++ b/mercurial/interfaces/repository.py
@@ -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(
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -418,9 +418,7 @@ 
 
         force = opts.get(b'force')
         if not force:
-            vdirs = []
             match = matchmod.badmatch(match, fail)
-            match.explicitdir = vdirs.append
 
         status = repo.status(match=match)
 
@@ -448,7 +446,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,