Show More
@@ -252,19 +252,19 b' class histeditstate(object):' | |||
|
252 | 252 | def read(self): |
|
253 | 253 | """Load histedit state from disk and set fields appropriately.""" |
|
254 | 254 | try: |
|
255 |
|
|
|
255 | state = self.repo.vfs.read('histedit-state') | |
|
256 | 256 | except IOError as err: |
|
257 | 257 | if err.errno != errno.ENOENT: |
|
258 | 258 | raise |
|
259 | 259 | raise error.Abort(_('no histedit in progress')) |
|
260 | 260 | |
|
261 | try: | |
|
262 |
data = |
|
|
261 | if state.startswith('v1\n'): | |
|
262 | data = self._load() | |
|
263 | parentctxnode, rules, keep, topmost, replacements, backupfile = data | |
|
264 | else: | |
|
265 | data = pickle.loads(state) | |
|
263 | 266 | parentctxnode, rules, keep, topmost, replacements = data |
|
264 | 267 | backupfile = None |
|
265 | except pickle.UnpicklingError: | |
|
266 | data = self._load() | |
|
267 | parentctxnode, rules, keep, topmost, replacements, backupfile = data | |
|
268 | 268 | |
|
269 | 269 | self.parentctxnode = parentctxnode |
|
270 | 270 | rules = "\n".join(["%s %s" % (verb, rest) for [verb, rest] in rules]) |
General Comments 0
You need to be logged in to leave comments.
Login now