mercurial/commit.py
changeset 45235 b65b4b09859c
parent 45234 595307e14140
child 45236 0c468fef09b3
--- a/mercurial/commit.py	Thu Jul 23 22:58:29 2020 +0200
+++ b/mercurial/commit.py	Thu Jul 23 23:08:00 2020 +0200
@@ -94,7 +94,7 @@
 
             # check in files
             added = []
-            filesadded = []
+            files_added = []
             removed = list(ctx.removed())
             touched = []
             linkrev = len(repo)
@@ -113,8 +113,8 @@
                         )
                         if is_touched:
                             touched.append(f)
-                            if writechangesetcopy and is_touched == 'added':
-                                filesadded.append(f)
+                            if is_touched == 'added':
+                                files_added.append(f)
                         m.setflag(f, fctx.flags())
                 except OSError:
                     repo.ui.warn(_(b"trouble committing %s!\n") % uipathfn(f))
@@ -143,6 +143,7 @@
 
             if writechangesetcopy:
                 filesremoved = removed
+                filesadded = files_added
 
         if not writefilecopymeta:
             # If writing only to changeset extras, use None to indicate that