Patchwork D6371: record: avoid modifying the matcher passed as a method parameter

login
register
mail settings
Submitter phabricator
Date May 13, 2019, 11:56 p.m.
Message ID <c2968a70623f3036b5c4f309dd318041@localhost.localdomain>
Download mbox | patch
Permalink /patch/40015/
State Not Applicable
Headers show

Comments

phabricator - May 13, 2019, 11:56 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG19b95afb0c01: record: avoid modifying the matcher passed as a method parameter (authored by mharbison72, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6371?vs=15065&id=15068

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

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -278,8 +278,8 @@ 
         force = opts.get('force')
         if not force:
             vdirs = []
+            match = matchmod.badmatch(match, fail)
             match.explicitdir = vdirs.append
-            match.bad = fail
 
         status = repo.status(match=match)