# HG changeset patch # User Milka Kuzminski # Date 2021-04-08 15:49:14 # Node ID 7a6d14d7df1f854e911c97a9d6a98408dab36378 # Parent c2f01e3c7d82d512ddabc40542336e71d2b0d5a0 Mercurial: fixed a case of lookup branches that had 40 characters in length. diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -609,6 +609,7 @@ class HgRemote(RemoteBase): @reraise_safe_exceptions def lookup(self, wire, revision, both): cache_on, context_uid, repo_id = self._cache_on(wire) + @self.region.conditional_cache_on_arguments(condition=cache_on) def _lookup(_context_uid, _repo_id, _revision, _both): diff --git a/vcsserver/hgcompat.py b/vcsserver/hgcompat.py --- a/vcsserver/hgcompat.py +++ b/vcsserver/hgcompat.py @@ -67,7 +67,7 @@ from mercurial.url import httpbasicauthh def get_ctx(repo, ref): try: ctx = repo[ref] - except ProgrammingError: + except (ProgrammingError, TypeError): # we're unable to find the rev using a regular lookup, we fallback # to slower, but backward compat revsymbol usage ctx = revsymbol(repo, ref)