Mercurial > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
23408:36dcd3db70ab | 23410:cd9e5e57064d |
---|---|
1033 def _flagfunc(self): | 1033 def _flagfunc(self): |
1034 return self._repo.dirstate.flagfunc(self._buildflagfunc) | 1034 return self._repo.dirstate.flagfunc(self._buildflagfunc) |
1035 | 1035 |
1036 @propertycache | 1036 @propertycache |
1037 def _manifest(self): | 1037 def _manifest(self): |
1038 """generate a manifest corresponding to the values in self._status""" | 1038 """generate a manifest corresponding to the values in self._status |
1039 | |
1040 This reuse the file nodeid from parent, but we append an extra letter | |
1041 when modified. Modified files get an extra 'm' while added files get | |
1042 appened an extra 'a'. This is used by manifests merge to see that files | |
1043 are different and by update logic to avoid deleting newly added files. | |
1044 """ | |
1039 | 1045 |
1040 man1 = self._parents[0].manifest() | 1046 man1 = self._parents[0].manifest() |
1041 man = man1.copy() | 1047 man = man1.copy() |
1042 if len(self._parents) > 1: | 1048 if len(self._parents) > 1: |
1043 man2 = self.p2().manifest() | 1049 man2 = self.p2().manifest() |