diff mercurial/destutil.py @ 32698:1b5c61d38a52

update: show the commit to which we updated in case of multiple heads (BC) Currently when we have multiple heads on the same branch, update tells us that there some more heads for the current branch but does not tells us the head to which the repository has been updated to. It makes more sense showing the head we updated to and then telling there are some more heads.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 06 Jun 2017 22:17:39 +0530
parents b9942bc6b292
children 4f49810a1011
line wrap: on
line diff
--- a/mercurial/destutil.py	Fri May 19 20:29:11 2017 -0700
+++ b/mercurial/destutil.py	Tue Jun 06 22:17:39 2017 +0530
@@ -391,6 +391,9 @@
                 ui.warn(_('(committing will reopen branch "%s")\n') %
                           (currentbranch))
         elif otherheads:
+            curhead = repo['.']
+            ui.status(_('updated to "%s: %s"\n') % (curhead,
+                                    curhead.description().split('\n')[0]))
             ui.status(_('%i other heads for branch "%s"\n') %
                       (len(otherheads), currentbranch))