diff mercurial/commands.py @ 25427:d0c7ffc4c8bc

merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 04 Jun 2015 17:51:19 -0500
parents 6084926366b9 9263f86b9681
children 1457c1f28c92
line wrap: on
line diff
--- a/mercurial/commands.py	Fri May 29 13:11:52 2015 -0700
+++ b/mercurial/commands.py	Thu Jun 04 17:51:19 2015 -0500
@@ -5138,7 +5138,13 @@
                 # When 'rev' is a bookmark name, we cannot guarantee that it
                 # will be updated with that name because of a race condition
                 # server side. (See issue 4689 for details)
-                revs = [other.lookup(rev) for rev in revs]
+                oldrevs = revs
+                revs = [] # actually, nodes
+                for r in oldrevs:
+                    node = other.lookup(r)
+                    revs.append(node)
+                    if r == checkout:
+                        checkout = node
             except error.CapabilityError:
                 err = _("other repository doesn't support revision lookup, "
                         "so a rev cannot be specified.")
@@ -5148,7 +5154,7 @@
                                  force=opts.get('force'),
                                  bookmarks=opts.get('bookmark', ())).cgresult
         if checkout:
-            checkout = str(repo.changelog.rev(other.lookup(checkout)))
+            checkout = str(repo.changelog.rev(checkout))
         repo._subtoppath = source
         try:
             ret = postincoming(ui, repo, modheads, opts.get('update'), checkout)