##// END OF EJS Templates
eol: import 'error' as 'errormod'...
marmoute -
r32995:74930cf4 stable
parent child Browse files
Show More
@@ -98,7 +98,7 b' import re'
98 98 from mercurial.i18n import _
99 99 from mercurial import (
100 100 config,
101 error,
101 error as errormod,
102 102 extensions,
103 103 match,
104 104 pycompat,
@@ -225,7 +225,7 b' def parseeol(ui, repo, nodes):'
225 225 return eolfile(ui, repo.root, data)
226 226 except (IOError, LookupError):
227 227 pass
228 except error.ParseError as inst:
228 except errormod.ParseError as inst:
229 229 ui.warn(_("warning: ignoring .hgeol file due to parse error "
230 230 "at %s: %s\n") % (inst.args[1], inst.args[0]))
231 231 return None
@@ -254,7 +254,7 b' def _checkhook(ui, repo, node, headsonly'
254 254 for f, target, node in sorted(failed):
255 255 msgs.append(_(" %s in %s should not have %s line endings") %
256 256 (f, node, eols[target]))
257 raise error.Abort(_("end-of-line check failed:\n") + "\n".join(msgs))
257 raise errormod.Abort(_("end-of-line check failed:\n") + "\n".join(msgs))
258 258
259 259 def checkallhook(ui, repo, node, hooktype, **kwargs):
260 260 """verify that files have expected EOLs"""
@@ -356,7 +356,7 b' def reposetup(ui, repo):'
356 356 # Write the cache to update mtime and cache .hgeol
357 357 with self.vfs("eol.cache", "w") as f:
358 358 f.write(hgeoldata)
359 except error.LockUnavailable:
359 except errormod.LockUnavailable:
360 360 # If we cannot lock the repository and clear the
361 361 # dirstate, then a commit might not see all files
362 362 # as modified. But if we cannot lock the
@@ -381,7 +381,7 b' def reposetup(ui, repo):'
381 381 # have all non-binary files taken care of.
382 382 continue
383 383 if inconsistenteol(data):
384 raise error.Abort(_("inconsistent newline style "
384 raise errormod.Abort(_("inconsistent newline style "
385 385 "in %s\n") % f)
386 386 return super(eolrepo, self).commitctx(ctx, haserror)
387 387 repo.__class__ = eolrepo
General Comments 0
You need to be logged in to leave comments. Login now