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