Skip to content
Snippets Groups Projects
Commit 039a53c8 authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

error: add a structured exception for unsupported merge records

We're going to use this in summary to print a better error message.
parent af266368
No related merge requests found
......@@ -112,6 +112,16 @@
class RequirementError(RepoError):
"""Exception raised if .hg/requires has an unknown entry."""
class UnsupportedMergeRecords(Abort):
def __init__(self, recordtypes):
from .i18n import _
self.recordtypes = sorted(recordtypes)
s = ' '.join(self.recordtypes)
Abort.__init__(
self, _('unsupported merge state records: %s') % s,
hint=_('see https://mercurial-scm.org/wiki/MergeStateRecords for '
'more information'))
class LockError(IOError):
def __init__(self, errno, strerror, filename, desc):
IOError.__init__(self, errno, strerror, filename)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment