##// END OF EJS Templates
dirstate: use `dirstate.change_files` to scope the change in `amend`...
marmoute -
r50937:237e9d2e default
parent child Browse files
Show More
@@ -2985,12 +2985,13 b' def amend(ui, repo, old, extra, pats, op'
2985 matcher = scmutil.match(wctx, pats, opts)
2985 matcher = scmutil.match(wctx, pats, opts)
2986 relative = scmutil.anypats(pats, opts)
2986 relative = scmutil.anypats(pats, opts)
2987 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
2987 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
2988 if opts.get(b'addremove') and scmutil.addremove(
2988 if opts.get(b'addremove'):
2989 repo, matcher, b"", uipathfn, opts
2989 with repo.dirstate.changing_files(repo):
2990 ):
2990 if scmutil.addremove(repo, matcher, b"", uipathfn, opts) != 0:
2991 raise error.Abort(
2991 m = _(
2992 _(b"failed to mark all new/missing files as added/removed")
2992 b"failed to mark all new/missing files as added/removed"
2993 )
2993 )
2994 raise error.Abort(m)
2994
2995
2995 # Check subrepos. This depends on in-place wctx._status update in
2996 # Check subrepos. This depends on in-place wctx._status update in
2996 # subrepo.precommit(). To minimize the risk of this hack, we do
2997 # subrepo.precommit(). To minimize the risk of this hack, we do
General Comments 0
You need to be logged in to leave comments. Login now