bookmarks: show outgoing bookmarks more exactly
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 08 Apr 2015 02:56:19 +0900
changeset 24658 8ea893ab0572
parent 24657 3d7c512b258d
child 24659 4ee00d6b0e29
bookmarks: show outgoing bookmarks more exactly Before this patch, "hg outgoing -B" shows only bookmarks added locally. Then, users can't know about bookmarks below before "hg push" execution. - deleted locally (even though it may be added remotely from "hg pull" view) - advanced locally - diverged - changed (= remote revision is unknown for local) This patch shows such bookmarks, too.
mercurial/bookmarks.py
tests/test-bookmarks-pushpull.t
--- a/mercurial/bookmarks.py	Wed Apr 08 02:56:19 2015 +0900
+++ b/mercurial/bookmarks.py	Wed Apr 08 02:56:19 2015 +0900
@@ -494,6 +494,14 @@
         outgoings.append("   %-25s %s\n" % (b, getid(id)))
     for b, scid, dcid in addsrc:
         add(b, scid)
+    for b, scid, dcid in adddst:
+        add(b, ' ' * 40)
+    for b, scid, dcid in advsrc:
+        add(b, scid)
+    for b, scid, dcid in diverge:
+        add(b, scid)
+    for b, scid, dcid in differ:
+        add(b, scid)
 
     if not outgoings:
         ui.status(_("no changed bookmarks found\n"))
--- a/tests/test-bookmarks-pushpull.t	Wed Apr 08 02:56:19 2015 +0900
+++ b/tests/test-bookmarks-pushpull.t	Wed Apr 08 02:56:19 2015 +0900
@@ -402,8 +402,11 @@
   $ hg out -B http://localhost:$HGPORT/
   comparing with http://localhost:$HGPORT/
   searching for changed bookmarks
-  no changed bookmarks found
-  [1]
+     @                         0d2164f0ce0d
+     X                         0d2164f0ce0d
+     Z                         0d2164f0ce0d
+     foo                                   
+     foobar                                
   $ hg push -B Z http://localhost:$HGPORT/
   pushing to http://localhost:$HGPORT/
   searching for changes