diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -3134,8 +3134,8 @@ # check in files added = [] filesadded = [] - changed = [] removed = list(ctx.removed()) + touched = [] linkrev = len(self) self.ui.note(_(b"committing files:\n")) uipathfn = scmutil.getuipathfn(self) @@ -3151,7 +3151,7 @@ fctx, m1, m2, linkrev, trp, writefilecopymeta, ) if is_touched: - changed.append(f) + touched.append(f) if writechangesetcopy and is_touched == 'added': filesadded.append(f) m.setflag(f, fctx.flags()) @@ -3180,7 +3180,7 @@ if writechangesetcopy: filesremoved = removed - files = changed + removed + files = touched + removed md = None if not files: # if no "files" actually changed in terms of the changelog,