commitctx: no longer make the storage and added/removed file optional
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 25 Jul 2020 16:13:17 +0200
changeset 45327 6de4c5647db3
parent 45326 99614011892b
child 45328 e52031f5e046
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.
mercurial/commit.py
--- a/mercurial/commit.py	Sat Jul 25 16:07:38 2020 +0200
+++ b/mercurial/commit.py	Sat Jul 25 16:13:17 2020 +0200
@@ -129,10 +129,8 @@
         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()