##// END OF EJS Templates
bookmarks: show detailed status about outgoing bookmarks...
FUJIWARA Katsunori -
r24661:8cf70c97 default
parent child Browse files
Show More
@@ -494,18 +494,22 b' def outgoing(ui, repo, other):'
494 getid = lambda id: id
494 getid = lambda id: id
495 else:
495 else:
496 getid = lambda id: id[:12]
496 getid = lambda id: id[:12]
497 def add(b, id):
497 if ui.verbose:
498 outgoings.append(" %-25s %s\n" % (b, getid(id)))
498 def add(b, id, st):
499 outgoings.append(" %-25s %s %s\n" % (b, getid(id), st))
500 else:
501 def add(b, id, st):
502 outgoings.append(" %-25s %s\n" % (b, getid(id)))
499 for b, scid, dcid in addsrc:
503 for b, scid, dcid in addsrc:
500 add(b, scid)
504 add(b, scid, _('added'))
501 for b, scid, dcid in adddst:
505 for b, scid, dcid in adddst:
502 add(b, ' ' * 40)
506 add(b, ' ' * 40, _('deleted'))
503 for b, scid, dcid in advsrc:
507 for b, scid, dcid in advsrc:
504 add(b, scid)
508 add(b, scid, _('advanced'))
505 for b, scid, dcid in diverge:
509 for b, scid, dcid in diverge:
506 add(b, scid)
510 add(b, scid, _('diverged'))
507 for b, scid, dcid in differ:
511 for b, scid, dcid in differ:
508 add(b, scid)
512 add(b, scid, _('changed'))
509
513
510 if not outgoings:
514 if not outgoings:
511 ui.status(_("no changed bookmarks found\n"))
515 ui.status(_("no changed bookmarks found\n"))
@@ -4795,6 +4795,31 b' def outgoing(ui, repo, dest=None, **opts'
4795
4795
4796 See pull for details of valid destination formats.
4796 See pull for details of valid destination formats.
4797
4797
4798 .. container:: verbose
4799
4800 With -B/--bookmarks, the result of bookmark comparison between
4801 local and remote repositories is displayed. With -v/--verbose,
4802 status is also displayed for each bookmark like below::
4803
4804 BM1 01234567890a added
4805 BM2 deleted
4806 BM3 234567890abc advanced
4807 BM4 34567890abcd diverged
4808 BM5 4567890abcde changed
4809
4810 The action taken when pushing depends on the
4811 status of each bookmark:
4812
4813 :``added``: push with ``-B`` will create it
4814 :``deleted``: push with ``-B`` will delete it
4815 :``advanced``: push will update it
4816 :``diverged``: push with ``-B`` will update it
4817 :``changed``: push with ``-B`` will update it
4818
4819 From the point of view of pushing behavior, bookmarks
4820 existing only in the remote repository are treated as
4821 ``deleted``, even if it is in fact added remotely.
4822
4798 Returns 0 if there are outgoing changes, 1 otherwise.
4823 Returns 0 if there are outgoing changes, 1 otherwise.
4799 """
4824 """
4800 if opts.get('graph'):
4825 if opts.get('graph'):
@@ -534,13 +534,13 b' be excahnged)'
534 $ hg -R repo1 outgoing -B repo2 -v
534 $ hg -R repo1 outgoing -B repo2 -v
535 comparing with repo2
535 comparing with repo2
536 searching for changed bookmarks
536 searching for changed bookmarks
537 ADD_ON_REPO1 66f7d451a68b
537 ADD_ON_REPO1 66f7d451a68b added
538 ADD_ON_REPO2
538 ADD_ON_REPO2 deleted
539 ADV_ON_REPO1 fa942426a6fd
539 ADV_ON_REPO1 fa942426a6fd advanced
540 DIFF_ADV_ON_REPO1 6100d3090acf
540 DIFF_ADV_ON_REPO1 6100d3090acf advanced
541 DIFF_ADV_ON_REPO2 1ea73414a91b
541 DIFF_ADV_ON_REPO2 1ea73414a91b changed
542 DIFF_DIVERGED 6100d3090acf
542 DIFF_DIVERGED 6100d3090acf changed
543 DIVERGED 66f7d451a68b
543 DIVERGED 66f7d451a68b diverged
544
544
545 $ hg -R repo2 incoming -B repo1 -v
545 $ hg -R repo2 incoming -B repo1 -v
546 comparing with repo1
546 comparing with repo1
@@ -553,13 +553,13 b' be excahnged)'
553 $ hg -R repo2 outgoing -B repo1 -v
553 $ hg -R repo2 outgoing -B repo1 -v
554 comparing with repo1
554 comparing with repo1
555 searching for changed bookmarks
555 searching for changed bookmarks
556 ADD_ON_REPO1
556 ADD_ON_REPO1 deleted
557 ADD_ON_REPO2 66f7d451a68b
557 ADD_ON_REPO2 66f7d451a68b added
558 ADV_ON_REPO2 66f7d451a68b
558 ADV_ON_REPO2 66f7d451a68b advanced
559 DIFF_ADV_ON_REPO1 1ea73414a91b
559 DIFF_ADV_ON_REPO1 1ea73414a91b changed
560 DIFF_ADV_ON_REPO2 e7bd5218ca15
560 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
561 DIFF_DIVERGED e7bd5218ca15
561 DIFF_DIVERGED e7bd5218ca15 changed
562 DIVERGED fa942426a6fd
562 DIVERGED fa942426a6fd diverged
563
563
564 $ cd ..
564 $ cd ..
565
565
General Comments 0
You need to be logged in to leave comments. Login now