Patchwork D3191: clone: avoid using repo.lookup() with binary nodeid

login
register
mail settings
Submitter phabricator
Date April 9, 2018, 2:17 p.m.
Message ID <36a8570b2d85b7444fe3a663561efc5f@localhost.localdomain>
Download mbox | patch
Permalink /patch/30586/
State Not Applicable
Headers show

Comments

phabricator - April 9, 2018, 2:17 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc569e51ee449: clone: avoid using repo.lookup() with binary nodeid (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3191?vs=7882&id=7891

REVISION DETAIL
  https://phab.mercurial-scm.org/D3191

AFFECTED FILES
  mercurial/hg.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -711,9 +711,9 @@ 
                 uprev = None
                 status = None
                 if checkout is not None:
-                    try:
-                        uprev = destrepo.lookup(checkout)
-                    except error.RepoLookupError:
+                    if checkout in destrepo:
+                        uprev = checkout
+                    else:
                         if update is not True:
                             try:
                                 uprev = destrepo.lookup(update)