Patchwork [10,of,15] commitctx: no longer make the storage and added/removed file optional

login
register
mail settings
Submitter Pierre-Yves David
Date July 29, 2020, 4:57 p.m.
Message ID <9d1d1cb2d9583aaf7c34.1596041860@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/46923/
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 1595686397 -7200
#      Sat Jul 25 16:13:17 2020 +0200
# Node ID 9d1d1cb2d9583aaf7c34d51808b309df9a55a12c
# Parent  520fbac6d2d2ac49604bd408c0e64c13355ff6dd
# EXP-Topic files-change
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 9d1d1cb2d958
commitctx: no longer make the storage and added/removed file optional

The code using this variable is always using other, stricter, condition before
using these value. So it is safe to always carry them along.

Patch

diff --git a/mercurial/commit.py b/mercurial/commit.py
--- a/mercurial/commit.py
+++ b/mercurial/commit.py
@@ -129,10 +129,8 @@  def _prepare_files(tr, ctx, error=False,
         mn = p1.manifestnode()
         touched = []
     else:
-        mn, touched, added, removed = _process_files(tr, ctx, error=error)
-        if writechangesetcopy:
-            filesremoved = removed
-            filesadded = added
+        r = _process_files(tr, ctx, error=error)
+        mn, touched, filesadded, filesremoved = r
 
     if origctx and origctx.manifestnode() == mn:
         touched = origctx.files()