diff mercurial/merge.py @ 45118:d0ef8c1dddd4

manifest: tigher manifest parsing and flag use In the manifest line, flags are put directly after the hash, so the parser has been guessing the presence of flags based on the length of the hash. Replace this assumption by an enumeration of the valid flags and removing them from the hash first as they are distinct input values. Consistently handle the expected 256bit length of the SHA1-replacement in the pure Python parser. Check that setting flags will use one of the blessed values. Extend write logic in the C version to handle 256bit hashes as well. Verify that hashes always have exactly the expected length. Since 1070df141718 we should no longer depend on the old extra-byte hack. Differential Revision: https://phab.mercurial-scm.org/D8679
author Joerg Sonnenberger <joerg@bec.de>
date Mon, 06 Jul 2020 03:43:32 +0200
parents a56ba57c837d
children e05a488cbed0
line wrap: on
line diff
--- a/mercurial/merge.py	Wed Jul 08 00:15:15 2020 +0200
+++ b/mercurial/merge.py	Mon Jul 06 03:43:32 2020 +0200
@@ -725,8 +725,7 @@
                             b'prompt changed/deleted',
                         )
                 elif n1 == addednodeid:
-                    # This extra 'a' is added by working copy manifest to mark
-                    # the file as locally added. We should forget it instead of
+                    # This file was locally added. We should forget it instead of
                     # deleting it.
                     actions[f] = (
                         mergestatemod.ACTION_FORGET,