D6937: copies: move file input processsing early

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Oct 1 13:08:04 EDT 2019


Closed by commit rHG041f042afcc5: copies: move file input processsing early (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6937?vs=16734&id=16756

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6937/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6937

AFFECTED FILES
  mercurial/changelog.py

CHANGE DETAILS

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -638,18 +638,26 @@
         if extra is not None:
             for name in ('p1copies', 'p2copies', 'filesadded', 'filesremoved'):
                 extra.pop(name, None)
+        if p1copies is not None:
+            p1copies = encodecopies(sortedfiles, p1copies)
+        if p2copies is not None:
+            p2copies = encodecopies(sortedfiles, p2copies)
+        if filesadded is not None:
+            filesadded = encodefileindices(sortedfiles, filesadded)
+        if filesremoved is not None:
+            filesremoved = encodefileindices(sortedfiles, filesremoved)
         if self._copiesstorage == 'extra':
             extrasentries = p1copies, p2copies, filesadded, filesremoved
             if extra is None and any(x is not None for x in extrasentries):
                 extra = {}
             if p1copies is not None:
-                extra['p1copies'] = encodecopies(sortedfiles, p1copies)
+                extra['p1copies'] = p1copies
             if p2copies is not None:
-                extra['p2copies'] = encodecopies(sortedfiles, p2copies)
+                extra['p2copies'] = p2copies
             if filesadded is not None:
-                extra['filesadded'] = encodefileindices(sortedfiles, filesadded)
+                extra['filesadded'] = filesadded
             if filesremoved is not None:
-                extra['filesremoved'] = encodefileindices(sortedfiles, filesremoved)
+                extra['filesremoved'] = filesremoved
 
         if extra:
             extra = encodeextra(extra)



To: marmoute, martinvonz, durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list