mercurial/hg.py
branchstable
changeset 38753 e06a10d3b926
parent 38380 63e6f5ae84bc
child 38798 d58958676b3c
--- a/mercurial/hg.py	Mon Jul 30 10:18:29 2018 -0400
+++ b/mercurial/hg.py	Mon Jul 30 15:36:04 2018 +0200
@@ -731,8 +731,14 @@
                 uprev = None
                 status = None
                 if checkout is not None:
-                    if checkout in destrepo:
+                    # Some extensions (at least hg-git and hg-subversion) have
+                    # a peer.lookup() implementation that returns a name instead
+                    # of a nodeid. We work around it here until we've figured
+                    # out a better solution.
+                    if len(checkout) == 20 and checkout in destrepo:
                         uprev = checkout
+                    elif scmutil.isrevsymbol(destrepo, checkout):
+                        uprev = scmutil.revsymbol(destrepo, checkout).node()
                     else:
                         if update is not True:
                             try: