Mercurial > hg
comparison mercurial/bookmarks.py @ 24661:8cf70c97a6e1
bookmarks: show detailed status about outgoing bookmarks
Before this patch, "hg outgoing -B" shows only difference of bookmarks
between two repositories, and it isn't user friendly.
This patch shows detailed status about outgoing bookmarks at "hg
outgoing -B".
To avoid breaking backward compatibility with other tool chains, this
patch shows status, only if --verbose is specified,
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 08 Apr 2015 02:56:19 +0900 |
parents | bf13b44bbb0a |
children | 5947a68fa271 |
comparison
equal
deleted
inserted
replaced
24660:bf13b44bbb0a | 24661:8cf70c97a6e1 |
---|---|
492 outgoings = [] | 492 outgoings = [] |
493 if ui.debugflag: | 493 if ui.debugflag: |
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")) |
512 return 1 | 516 return 1 |
513 | 517 |