diff mercurial/context.py @ 23410:cd9e5e57064d

manifest: document the extra letter in working copy manifest node As the second developer to get confused by this in November, I'm adding some documentation for the next poor soul.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 26 Nov 2014 15:37:01 -0800
parents b913c394386f
children 4dd8a6a1240d
line wrap: on
line diff
--- a/mercurial/context.py	Sun Nov 30 20:06:53 2014 +0100
+++ b/mercurial/context.py	Wed Nov 26 15:37:01 2014 -0800
@@ -1035,7 +1035,13 @@
 
     @propertycache
     def _manifest(self):
-        """generate a manifest corresponding to the values in self._status"""
+        """generate a manifest corresponding to the values in self._status
+
+        This reuse the file nodeid from parent, but we append an extra letter
+        when modified.  Modified files get an extra 'm' while added files get
+        appened an extra 'a'. This is used by manifests merge to see that files
+        are different and by update logic to avoid deleting newly added files.
+        """
 
         man1 = self._parents[0].manifest()
         man = man1.copy()