Submitter | phabricator |
---|---|
Date | Aug. 15, 2017, 9:32 p.m. |
Message ID | <62536c47b03fe60d3e1aa98442fda327@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/23052/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2998,9 +2998,10 @@ dsguard = None # extract addremove carefully -- this function can be called from a command # that doesn't support addremove + if opts.get('addremove'): + dsguard = dirstateguard.dirstateguard(repo, 'commit') try: - if opts.get('addremove'): - dsguard = dirstateguard.dirstateguard(repo, 'commit') + if dsguard: if scmutil.addremove(repo, matcher, "", opts) != 0: raise error.Abort( _("failed to mark all new/missing files as added/removed"))