Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 42297:19b95afb0c01
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
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 11 May 2019 22:08:57 -0400 |
parents | e45c6b153e51 |
children | 64ed405dd342 |
comparison
equal
deleted
inserted
replaced
42296:c8d55ff80da1 | 42297:19b95afb0c01 |
---|---|
276 raise error.Abort('%s: %s' % (f, msg)) | 276 raise error.Abort('%s: %s' % (f, msg)) |
277 | 277 |
278 force = opts.get('force') | 278 force = opts.get('force') |
279 if not force: | 279 if not force: |
280 vdirs = [] | 280 vdirs = [] |
281 match = matchmod.badmatch(match, fail) | |
281 match.explicitdir = vdirs.append | 282 match.explicitdir = vdirs.append |
282 match.bad = fail | |
283 | 283 |
284 status = repo.status(match=match) | 284 status = repo.status(match=match) |
285 | 285 |
286 overrides = {(b'ui', b'commitsubrepos'): True} | 286 overrides = {(b'ui', b'commitsubrepos'): True} |
287 | 287 |