Show More
@@ -74,15 +74,19 b' from mercurial import strip as hgext_str' | |||
|
74 | 74 | def get_ctx(repo, ref): |
|
75 | 75 | if not isinstance(ref, int): |
|
76 | 76 | ref = safe_bytes(ref) |
|
77 | ||
|
77 | 78 | try: |
|
78 | 79 | ctx = repo[ref] |
|
80 | return ctx | |
|
79 | 81 | except (ProgrammingError, TypeError): |
|
80 | 82 | # we're unable to find the rev using a regular lookup, we fallback |
|
81 | 83 | # to slower, but backward compat revsymbol usage |
|
82 | ctx = revsymbol(repo, ref) | |
|
84 | pass | |
|
83 | 85 | except (LookupError, RepoLookupError): |
|
84 | 86 | # Similar case as above but only for refs that are not numeric |
|
85 | 87 | if isinstance(ref, int): |
|
86 | 88 | raise |
|
89 | ||
|
87 | 90 |
|
|
91 | ||
|
88 | 92 | return ctx |
General Comments 0
You need to be logged in to leave comments.
Login now