# HG changeset patch # User Matt Harbison # Date 2019-05-12 02:08:57 # Node ID 19b95afb0c01a3b2700ee3aeb179811b73600457 # Parent c8d55ff80da1675edf7f2046f67d658f9169aa00 record: avoid modifying the matcher passed as a method parameter No problem observed, but I remember the previous pattern causing problems with largefiles and/or subrepos. This special matcher was added in 419ac63fe29c, so directly modifying the `fail` callback was probably an oversight in 44611ad4fbd9. Differential Revision: https://phab.mercurial-scm.org/D6371 diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -278,8 +278,8 @@ def dorecord(ui, repo, commitfunc, cmdsu 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)