mercurial/commit.py
changeset 45237 39f4ec4039a8
parent 45236 0c468fef09b3
child 45238 bd7515273fd6
--- a/mercurial/commit.py	Thu Jul 23 18:25:45 2020 +0200
+++ b/mercurial/commit.py	Thu Jul 23 23:40:59 2020 +0200
@@ -89,6 +89,9 @@
                 filesremoved = removed
                 filesadded = added
 
+        if origctx and origctx.manifestnode() == mn:
+            files = origctx.files()
+
         if not writefilecopymeta:
             # If writing only to changeset extras, use None to indicate that
             # no entry should be written. If writing to both, write an empty
@@ -99,9 +102,6 @@
             filesadded = filesadded or None
             filesremoved = filesremoved or None
 
-        if origctx and origctx.manifestnode() == mn:
-            files = origctx.files()
-
         # update changelog
         repo.ui.note(_(b"committing changelog\n"))
         repo.changelog.delayupdate(tr)