comparison mercurial/error.py @ 26985:039a53c87370

error: add a structured exception for unsupported merge records We're going to use this in summary to print a better error message.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 17 Nov 2015 14:10:12 -0800
parents 5e46123e6c35
children f8142cb77b1e
comparison
equal deleted inserted replaced
26984:af2663680e95 26985:039a53c87370
109 class CapabilityError(RepoError): 109 class CapabilityError(RepoError):
110 pass 110 pass
111 111
112 class RequirementError(RepoError): 112 class RequirementError(RepoError):
113 """Exception raised if .hg/requires has an unknown entry.""" 113 """Exception raised if .hg/requires has an unknown entry."""
114
115 class UnsupportedMergeRecords(Abort):
116 def __init__(self, recordtypes):
117 from .i18n import _
118 self.recordtypes = sorted(recordtypes)
119 s = ' '.join(self.recordtypes)
120 Abort.__init__(
121 self, _('unsupported merge state records: %s') % s,
122 hint=_('see https://mercurial-scm.org/wiki/MergeStateRecords for '
123 'more information'))
114 124
115 class LockError(IOError): 125 class LockError(IOError):
116 def __init__(self, errno, strerror, filename, desc): 126 def __init__(self, errno, strerror, filename, desc):
117 IOError.__init__(self, errno, strerror, filename) 127 IOError.__init__(self, errno, strerror, filename)
118 self.desc = desc 128 self.desc = desc