Commit 35c1d7f6 authored by Pulkit Goyal's avatar Pulkit Goyal

mergestate: fix BC breakage introduced because of removal of a merge record

In fcd0cff3400a I removed the usage of RECORD_RESOLVED_OTHER. However I also
removed the reading support, hence if there is any user who runs into merge
conflict with older version of hg, upgrades hg and then tries to read
mergestate, they will end up with an MergeRecordUnsupportedError.

--HG--
branch : stable
parent 9b5723784aac
Pipeline #8814 passed with stage
in 29 minutes and 30 seconds
......@@ -96,6 +96,12 @@ MERGE_DRIVER_STATE_UNMARKED = b'u'
MERGE_DRIVER_STATE_MARKED = b'm'
MERGE_DRIVER_STATE_SUCCESS = b's'
#####
# legacy records which are no longer used but kept to prevent breaking BC
#####
# This record was release in 5.4 and usage was removed in 5.5
LEGACY_RECORD_RESOLVED_OTHER = b'R'
ACTION_FORGET = b'f'
ACTION_REMOVE = b'r'
......@@ -249,6 +255,7 @@ class mergestate(object):
RECORD_CHANGEDELETE_CONFLICT,
RECORD_PATH_CONFLICT,
RECORD_MERGE_DRIVER_MERGE,
LEGACY_RECORD_RESOLVED_OTHER,
):
bits = record.split(b'\0')
self._state[bits[0]] = bits[1:]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment