##// END OF EJS Templates
mergestate: raise structured exception for unsupported merge records...
Siddharth Agarwal -
r26986:1ee5e48f default
parent child Browse files
Show More
@@ -110,6 +110,7 b' class mergestate(object):'
110 110 del self.otherctx
111 111 self._readmergedriver = None
112 112 self._mdstate = 's'
113 unsupported = set()
113 114 records = self._readrecords()
114 115 for rtype, record in records:
115 116 if rtype == 'L':
@@ -129,10 +130,12 b' class mergestate(object):'
129 130 bits = record.split('\0')
130 131 self._state[bits[0]] = bits[1:]
131 132 elif not rtype.islower():
132 raise error.Abort(_('unsupported merge state record: %s')
133 % rtype)
133 unsupported.add(rtype)
134 134 self._dirty = False
135 135
136 if unsupported:
137 raise error.UnsupportedMergeRecords(unsupported)
138
136 139 def _readrecords(self):
137 140 """Read merge state from disk and return a list of record (TYPE, data)
138 141
General Comments 0
You need to be logged in to leave comments. Login now