Mercurial > hg
changeset 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 | af2663680e95 |
children | 1ee5e48f09d4 |
files | mercurial/error.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/error.py Tue Nov 17 13:47:16 2015 -0800 +++ b/mercurial/error.py Tue Nov 17 14:10:12 2015 -0800 @@ -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)