Show More
@@ -10,7 +10,6 b' from __future__ import absolute_import' | |||||
10 | import errno |
|
10 | import errno | |
11 | import filecmp |
|
11 | import filecmp | |
12 | import os |
|
12 | import os | |
13 | import re |
|
|||
14 | import stat |
|
13 | import stat | |
15 |
|
14 | |||
16 | from .i18n import _ |
|
15 | from .i18n import _ | |
@@ -51,8 +50,6 b' from .utils import (' | |||||
51 |
|
50 | |||
52 | propertycache = util.propertycache |
|
51 | propertycache = util.propertycache | |
53 |
|
52 | |||
54 | nonascii = re.compile(br'[^\x21-\x7f]').search |
|
|||
55 |
|
||||
56 | class basectx(object): |
|
53 | class basectx(object): | |
57 | """A basectx object represents the common logic for its children: |
|
54 | """A basectx object represents the common logic for its children: | |
58 | changectx: read-only context that is already present in the repo, |
|
55 | changectx: read-only context that is already present in the repo, | |
@@ -420,6 +417,7 b' class changectx(basectx):' | |||||
420 | and changeid in repo.unfiltered().dirstate.parents()): |
|
417 | and changeid in repo.unfiltered().dirstate.parents()): | |
421 | msg = _("working directory has unknown parent '%s'!") |
|
418 | msg = _("working directory has unknown parent '%s'!") | |
422 | raise error.Abort(msg % short(changeid)) |
|
419 | raise error.Abort(msg % short(changeid)) | |
|
420 | changeid = hex(changeid) # for the error message | |||
423 |
|
421 | |||
424 | elif len(changeid) == 40: |
|
422 | elif len(changeid) == 40: | |
425 | try: |
|
423 | try: | |
@@ -432,11 +430,6 b' class changectx(basectx):' | |||||
432 | pass |
|
430 | pass | |
433 |
|
431 | |||
434 | # lookup failed |
|
432 | # lookup failed | |
435 | try: |
|
|||
436 | if len(changeid) == 20 and nonascii(changeid): |
|
|||
437 | changeid = hex(changeid) |
|
|||
438 | except TypeError: |
|
|||
439 | pass |
|
|||
440 | except (error.FilteredIndexError, error.FilteredLookupError): |
|
433 | except (error.FilteredIndexError, error.FilteredLookupError): | |
441 | raise error.FilteredRepoLookupError(_("filtered revision '%s'") |
|
434 | raise error.FilteredRepoLookupError(_("filtered revision '%s'") | |
442 | % changeid) |
|
435 | % changeid) |
General Comments 0
You need to be logged in to leave comments.
Login now