mercurial/hg.py
changeset 46198 72007a9ac064
parent 46123 5b9bb4e9a3bf
child 46314 95a615dd77bf
--- a/mercurial/hg.py	Thu Dec 17 13:29:50 2020 +0100
+++ b/mercurial/hg.py	Sun Dec 20 15:38:50 2020 +0100
@@ -1013,15 +1013,19 @@
                                 pass
                 if uprev is None:
                     try:
-                        uprev = destrepo._bookmarks[b'@']
-                        update = b'@'
+                        if destrepo._activebookmark:
+                            uprev = destrepo.lookup(destrepo._activebookmark)
+                            update = destrepo._activebookmark
+                        else:
+                            uprev = destrepo._bookmarks[b'@']
+                            update = b'@'
                         bn = destrepo[uprev].branch()
                         if bn == b'default':
-                            status = _(b"updating to bookmark @\n")
+                            status = _(b"updating to bookmark %s\n" % update)
                         else:
                             status = (
-                                _(b"updating to bookmark @ on branch %s\n") % bn
-                            )
+                                _(b"updating to bookmark %s on branch %s\n")
+                            ) % (update, bn)
                     except KeyError:
                         try:
                             uprev = destrepo.branchtip(b'default')