Patchwork [1,of,5,V7] bookmarks: show incoming bookmarks more exactly

login
register
mail settings
Submitter Katsunori FUJIWARA
Date April 7, 2015, 6:04 p.m.
Message ID <9c435648fcf7d0239fdb.1428429843@juju>
Download mbox | patch
Permalink /patch/8539/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - April 7, 2015, 6:04 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1428429379 -32400
#      Wed Apr 08 02:56:19 2015 +0900
# Node ID 9c435648fcf7d0239fdbeb3e5cd5f12af80961b1
# Parent  b2fb1403994e033584aed8a487ab162a9d75fa80
bookmarks: show incoming bookmarks more exactly

Before this patch, "hg incoming -B" shows only bookmarks added
remotely. Then, users can't know about bookmarks below before "hg
pull" execution.

  - advanced remotely
  - diverged
  - changed (remote revision is unknown for local)

This patch shows such bookmarks, too.

Patch

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -460,6 +460,12 @@  def incoming(ui, repo, other):
         incomings.append("   %-25s %s\n" % (b, getid(id)))
     for b, scid, dcid in addsrc:
         add(b, scid)
+    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 incomings:
         ui.status(_("no changed bookmarks found\n"))
diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -414,6 +414,8 @@  hgweb
   $ hg in -B http://localhost:$HGPORT/
   comparing with http://localhost:$HGPORT/
   searching for changed bookmarks
+     @                         9b140be10808
+     X                         9b140be10808
      Z                         0d2164f0ce0d
      foo                       000000000000
      foobar                    9b140be10808