Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 42643:ce52377102db stable
amend: stop committing unrequested file reverts (issue6157)
Differential Revision: https://phab.mercurial-scm.org/D6667
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Mon, 22 Jul 2019 06:33:11 -0400 |
parents | 5162753c4c14 |
children | 3cf091843b4f |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Mon Jul 22 06:33:00 2019 -0400 +++ b/mercurial/cmdutil.py Mon Jul 22 06:33:11 2019 -0400 @@ -2505,8 +2505,8 @@ # was removed, it's no longer relevant. If X is missing (aka # deleted), old X must be preserved. files.update(filestoamend) - files = [f for f in files if (not samefile(f, wctx, base) - or f in wctx.deleted())] + files = [f for f in files if (f not in filestoamend + or not samefile(f, wctx, base))] def filectxfn(repo, ctx_, path): try: