Patchwork [04,of,15] commitctx: rename files to touched in a couple of place

login
register
mail settings
Submitter Pierre-Yves David
Date July 29, 2020, 4:57 p.m.
Message ID <abdea95834b108e194df.1596041854@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/46919/
State Accepted
Headers show

Comments

Pierre-Yves David - July 29, 2020, 4:57 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1595684025 -7200
#      Sat Jul 25 15:33:45 2020 +0200
# Node ID abdea95834b108e194df0f686f01fb4fd1847691
# Parent  3e4e9837d03bd1345438e69ae154b72daa5cee6b
# EXP-Topic files-change
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r abdea95834b1
commitctx: rename files to touched in a couple of place

This is a clearer word that we will use increasingly over this series. It also
make the old variable name available to another usage :-)

Patch

diff --git a/mercurial/commit.py b/mercurial/commit.py
--- a/mercurial/commit.py
+++ b/mercurial/commit.py
@@ -132,22 +132,22 @@  def _prepare_files(tr, ctx, error=False,
         # reuse an existing manifest revision
         repo.ui.debug(b'reusing known manifest\n')
         mn = ctx.manifestnode()
-        files = ctx.files()
+        touched = ctx.files()
         if writechangesetcopy:
             filesadded = ctx.filesadded()
             filesremoved = ctx.filesremoved()
     elif not ctx.files():
         repo.ui.debug(b'reusing manifest from p1 (no file change)\n')
         mn = p1.manifestnode()
-        files = []
+        touched = []
     else:
-        mn, files, added, removed = _process_files(tr, ctx, error=error)
+        mn, touched, added, removed = _process_files(tr, ctx, error=error)
         if writechangesetcopy:
             filesremoved = removed
             filesadded = added
 
     if origctx and origctx.manifestnode() == mn:
-        files = origctx.files()
+        touched = origctx.files()
 
     if not writefilecopymeta:
         # If writing only to changeset extras, use None to indicate that
@@ -159,7 +159,7 @@  def _prepare_files(tr, ctx, error=False,
         filesadded = filesadded or None
         filesremoved = filesremoved or None
 
-    return mn, files, p1copies, p2copies, filesadded, filesremoved
+    return mn, touched, p1copies, p2copies, filesadded, filesremoved
 
 
 def _process_files(tr, ctx, error=False):