@@ -497,20 +497,25 @@ def outgoing(ui, repo, other):
getid = lambda id: id
else:
getid = lambda id: id[:12]
- def add(b, id):
- outgoings.append(" %-25s %s\n" % (b, getid(id)))
+ if ui.verbose:
+ def add(b, id, act, msg):
+ outgoings.append(" %-25s %s (%s) %s\n" %
+ (b, getid(id), act, msg))
+ else:
+ def add(b, id, act, msg):
+ outgoings.append(" %-25s %s\n" % (b, getid(id)))
for b, scid, dcid in addsrc:
- add(b, scid)
+ add(b, scid, 'B', _('added locally'))
for b, scid, dcid in adddst:
- add(b, ' ' * 40)
+ add(b, ' ' * 40, 'B', _('deleted locally, perhaps'))
for b, scid, dcid in advsrc:
- add(b, scid)
+ add(b, scid, '-', _('advanced locally'))
for b, scid, dcid in advdst:
- add(b, scid)
+ add(b, scid, 'B', _('advanced remotely'))
for b, scid, dcid in diverge:
- add(b, scid)
+ add(b, scid, 'B', _('diverged'))
for b, scid, dcid in differ:
- add(b, scid)
+ add(b, scid, 'B', _('changed'))
if not outgoings:
ui.status(_("no changed bookmarks found\n"))
@@ -4792,6 +4792,25 @@ def outgoing(ui, repo, dest=None, **opts
See pull for details of valid destination formats.
+ .. container:: verbose
+
+ With -B/--bookmarks, the result of bookmark comparison between
+ local and remote repositories is displayed. In addition to it,
+ -v/--verbose shows also detail for each bookmarks in the format
+ below::
+
+ BM1 01234567890a (-) advanced locally
+ BM2 1234567890ab (B) diverged
+
+ Each lines consist of four columns: "bookmark name", "local
+ value", "action at pushing" and "detail of difference".
+
+ "action at pushing" column shows about bookmark updating in the
+ remote repository by marks below:
+
+ :``-``: updated implicitly
+ :``B``: not updated implicitly (use -B to update forcibly)
+
Returns 0 if there are outgoing changes, 1 otherwise.
"""
if opts.get('graph'):
@@ -536,14 +536,14 @@ be excahnged)
$ hg -R repo1 outgoing -B repo2 -v
comparing with repo2
searching for changed bookmarks
- ADD_ON_REPO1 66f7d451a68b
- ADD_ON_REPO2
- ADV_ON_REPO1 fa942426a6fd
- ADV_ON_REPO2 1ea73414a91b
- DIFF_ADV_ON_REPO1 6100d3090acf
- DIFF_ADV_ON_REPO2 1ea73414a91b
- DIFF_DIVERGED 6100d3090acf
- DIVERGED 66f7d451a68b
+ ADD_ON_REPO1 66f7d451a68b (B) added locally
+ ADD_ON_REPO2 (B) deleted locally, perhaps
+ ADV_ON_REPO1 fa942426a6fd (-) advanced locally
+ ADV_ON_REPO2 1ea73414a91b (B) advanced remotely
+ DIFF_ADV_ON_REPO1 6100d3090acf (-) advanced locally
+ DIFF_ADV_ON_REPO2 1ea73414a91b (B) changed
+ DIFF_DIVERGED 6100d3090acf (B) changed
+ DIVERGED 66f7d451a68b (B) diverged
$ hg -R repo2 incoming -B repo1 -v
comparing with repo1
@@ -558,14 +558,14 @@ be excahnged)
$ hg -R repo2 outgoing -B repo1 -v
comparing with repo1
searching for changed bookmarks
- ADD_ON_REPO1
- ADD_ON_REPO2 66f7d451a68b
- ADV_ON_REPO1 1ea73414a91b
- ADV_ON_REPO2 66f7d451a68b
- DIFF_ADV_ON_REPO1 1ea73414a91b
- DIFF_ADV_ON_REPO2 e7bd5218ca15
- DIFF_DIVERGED e7bd5218ca15
- DIVERGED fa942426a6fd
+ ADD_ON_REPO1 (B) deleted locally, perhaps
+ ADD_ON_REPO2 66f7d451a68b (B) added locally
+ ADV_ON_REPO1 1ea73414a91b (B) advanced remotely
+ ADV_ON_REPO2 66f7d451a68b (-) advanced locally
+ DIFF_ADV_ON_REPO1 1ea73414a91b (B) changed
+ DIFF_ADV_ON_REPO2 e7bd5218ca15 (-) advanced locally
+ DIFF_DIVERGED e7bd5218ca15 (B) changed
+ DIVERGED fa942426a6fd (B) diverged
$ cd ..