83 self._dirty = False |
83 self._dirty = False |
84 |
84 |
85 def _readrecords(self): |
85 def _readrecords(self): |
86 """Read merge state from disk and return a list of record (TYPE, data) |
86 """Read merge state from disk and return a list of record (TYPE, data) |
87 |
87 |
88 We read data from both V1 and Ve files decide which on to use. |
88 We read data from both v1 and v2 files and decide which one to use. |
89 |
89 |
90 V1 have been used by version prior to 2.9.1 and contains less data than |
90 V1 has been used by version prior to 2.9.1 and contains less data than |
91 v2. We read both version and check if no data in v2 contradict one in |
91 v2. We read both versions and check if no data in v2 contradicts |
92 v1. If there is not contradiction we can safely assume that both v1 |
92 v1. If there is not contradiction we can safely assume that both v1 |
93 and v2 were written at the same time and use the extract data in v2. If |
93 and v2 were written at the same time and use the extract data in v2. If |
94 there is contradiction we ignore v2 content as we assume an old version |
94 there is contradiction we ignore v2 content as we assume an old version |
95 of Mercurial have over written the mergstate file and left an old v2 |
95 of Mercurial has overwritten the mergestate file and left an old v2 |
96 file around. |
96 file around. |
97 |
97 |
98 returns list of record [(TYPE, data), ...]""" |
98 returns list of record [(TYPE, data), ...]""" |
99 v1records = self._readrecordsv1() |
99 v1records = self._readrecordsv1() |
100 v2records = self._readrecordsv2() |
100 v2records = self._readrecordsv2() |