Mercurial > hg-stable
changeset 45231:025ee25b5b23
commitctx: rename "changed" to touched
The variable contains content that are both added and modified. "changed" could
be confused with "modified" only, so we pick a less ambiguous naming that will
help with more unification.
For example, it would make sense to shove the "removed" item in there since
this is how the variable is used.
This is part of a larger refactoring/cleanup of the commitctx code to clarify
and augment the logic gathering metadata useful for copy tracing. The current
code is a tad too long and entangled to make such update easy. We start with
easy and small cleanup.
Differential Revision: https://phab.mercurial-scm.org/D8706
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 06 Jul 2020 22:35:34 +0200 |
parents | 6979a20ff004 |
children | c068e355cd71 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Jul 07 11:16:28 2020 +0200 +++ b/mercurial/localrepo.py Mon Jul 06 22:35:34 2020 +0200 @@ -3121,8 +3121,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) @@ -3138,7 +3138,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()) @@ -3167,7 +3167,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,