Show More
@@ -42,21 +42,18 b' def _droponode(data):' | |||
|
42 | 42 | class mergestate(object): |
|
43 | 43 | '''track 3-way merge state of individual files |
|
44 | 44 | |
|
45 |
|
|
|
46 | format, one with a new format. Both contains similar data, but the new | |
|
47 | format can store new kinds of field. | |
|
48 | ||
|
49 | Current new format is a list of arbitrary record of the form: | |
|
50 | ||
|
51 | [type][length][content] | |
|
45 | The merge state is stored on disk when needed. Two files are used: one with | |
|
46 | an old format (version 1), and one with a new format (version 2). Version 2 | |
|
47 | stores a superset of the data in version 1, including new kinds of records | |
|
48 | in the future. For more about the new format, see the documentation for | |
|
49 | `_readrecordsv2`. | |
|
52 | 50 | |
|
53 | Type is a single character, length is a 4 bytes integer, content is an | |
|
54 | arbitrary suites of bytes of length `length`. | |
|
51 | Each record can contain arbitrary content, and has an associated type. This | |
|
52 | `type` should be a letter. If `type` is uppercase, the record is mandatory: | |
|
53 | versions of Mercurial that don't support it should abort. If `type` is | |
|
54 | lowercase, the record can be safely ignored. | |
|
55 | 55 | |
|
56 | Type should be a letter. Capital letter are mandatory record, Mercurial | |
|
57 | should abort if they are unknown. lower case record can be safely ignored. | |
|
58 | ||
|
59 | Currently known record: | |
|
56 | Currently known records: | |
|
60 | 57 | |
|
61 | 58 | L: the node of the "local" part of the merge (hexified version) |
|
62 | 59 | O: the node of the "other" part of the merge (hexified version) |
@@ -71,6 +68,7 b' class mergestate(object):' | |||
|
71 | 68 | to resolve or commit |
|
72 | 69 | m: driver-resolved files marked -- only needs to be run before commit |
|
73 | 70 | s: success/skipped -- does not need to be run any more |
|
71 | ||
|
74 | 72 | ''' |
|
75 | 73 | statepathv1 = 'merge/state' |
|
76 | 74 | statepathv2 = 'merge/state2' |
@@ -226,8 +224,14 b' class mergestate(object):' | |||
|
226 | 224 | def _readrecordsv2(self): |
|
227 | 225 | """read on disk merge state for version 2 file |
|
228 | 226 | |
|
229 | returns list of record [(TYPE, data), ...] | |
|
230 | """ | |
|
227 | This format is a list of arbitrary records of the form: | |
|
228 | ||
|
229 | [type][length][content] | |
|
230 | ||
|
231 | `type` is a single character, `length` is a 4 byte integer, and | |
|
232 | `content` is an arbitrary byte sequence of length `length`. | |
|
233 | ||
|
234 | Returns list of records [(TYPE, data), ...].""" | |
|
231 | 235 | records = [] |
|
232 | 236 | try: |
|
233 | 237 | f = self._repo.vfs(self.statepathv2) |
General Comments 0
You need to be logged in to leave comments.
Login now