Show More
@@ -183,7 +183,6 b' unexpectedly::' | |||||
183 |
|
183 | |||
184 | from __future__ import absolute_import |
|
184 | from __future__ import absolute_import | |
185 |
|
185 | |||
186 | import errno |
|
|||
187 | import os |
|
186 | import os | |
188 |
|
187 | |||
189 | from mercurial.i18n import _ |
|
188 | from mercurial.i18n import _ | |
@@ -313,14 +312,10 b' class histeditstate(object):' | |||||
313 |
|
312 | |||
314 | def read(self): |
|
313 | def read(self): | |
315 | """Load histedit state from disk and set fields appropriately.""" |
|
314 | """Load histedit state from disk and set fields appropriately.""" | |
316 | try: |
|
315 | if not self.stateobj.exists(): | |
317 | state = self.repo.vfs.read('histedit-state') |
|
|||
318 | except IOError as err: |
|
|||
319 | if err.errno != errno.ENOENT: |
|
|||
320 | raise |
|
|||
321 | cmdutil.wrongtooltocontinue(self.repo, _('histedit')) |
|
316 | cmdutil.wrongtooltocontinue(self.repo, _('histedit')) | |
322 |
|
317 | |||
323 |
data = self._read( |
|
318 | data = self._read() | |
324 |
|
319 | |||
325 | self.parentctxnode = data['parentctxnode'] |
|
320 | self.parentctxnode = data['parentctxnode'] | |
326 | actions = parserules(data['rules'], self) |
|
321 | actions = parserules(data['rules'], self) | |
@@ -330,7 +325,8 b' class histeditstate(object):' | |||||
330 | self.replacements = data['replacements'] |
|
325 | self.replacements = data['replacements'] | |
331 | self.backupfile = data['backupfile'] |
|
326 | self.backupfile = data['backupfile'] | |
332 |
|
327 | |||
333 |
def _read(self |
|
328 | def _read(self): | |
|
329 | fp = self.repo.vfs.read('histedit-state') | |||
334 | if fp.startswith('v1\n'): |
|
330 | if fp.startswith('v1\n'): | |
335 | data = self._load() |
|
331 | data = self._load() | |
336 | parentctxnode, rules, keep, topmost, replacements, backupfile = data |
|
332 | parentctxnode, rules, keep, topmost, replacements, backupfile = data |
General Comments 0
You need to be logged in to leave comments.
Login now