##// END OF EJS Templates
mercurial: fixed lookup case of pure numeric refs.
marcink -
r823:e85e735f stable
parent child Browse files
Show More
@@ -67,9 +67,13 b' from mercurial.url import httpbasicauthh'
67 def get_ctx(repo, ref):
67 def get_ctx(repo, ref):
68 try:
68 try:
69 ctx = repo[ref]
69 ctx = repo[ref]
70 except (ProgrammingError, LookupError, RepoLookupError):
70 except ProgrammingError:
71 # we're unable to find the rev using a regular lookup, we fallback
71 # we're unable to find the rev using a regular lookup, we fallback
72 # to slower, but backward compat revsymbol usage
72 # to slower, but backward compat revsymbol usage
73 ctx = revsymbol(repo, ref)
73 ctx = revsymbol(repo, ref)
74
74 except (LookupError, RepoLookupError):
75 # Similar case as above but only for refs that are not numeric
76 if isinstance(ref, (int, long)):
77 raise
78 ctx = revsymbol(repo, ref)
75 return ctx
79 return ctx
General Comments 0
You need to be logged in to leave comments. Login now