993 else: # show bookmarks |
993 else: # show bookmarks |
994 hexfn = ui.debugflag and hex or short |
994 hexfn = ui.debugflag and hex or short |
995 marks = repo._bookmarks |
995 marks = repo._bookmarks |
996 if len(marks) == 0: |
996 if len(marks) == 0: |
997 ui.status(_("no bookmarks set\n")) |
997 ui.status(_("no bookmarks set\n")) |
998 else: |
998 for bmark, n in sorted(marks.iteritems()): |
999 for bmark, n in sorted(marks.iteritems()): |
999 current = repo._bookmarkcurrent |
1000 current = repo._bookmarkcurrent |
1000 if bmark == current: |
1001 if bmark == current: |
1001 prefix, label = '*', 'bookmarks.current' |
1002 prefix, label = '*', 'bookmarks.current' |
1002 else: |
1003 else: |
1003 prefix, label = ' ', '' |
1004 prefix, label = ' ', '' |
1004 |
1005 |
1005 if ui.quiet: |
1006 if ui.quiet: |
1006 ui.write("%s\n" % bmark, label=label) |
1007 ui.write("%s\n" % bmark, label=label) |
1007 else: |
1008 else: |
1008 pad = " " * (25 - encoding.colwidth(bmark)) |
1009 pad = " " * (25 - encoding.colwidth(bmark)) |
1009 ui.write(" %s %s%s %d:%s\n" % ( |
1010 ui.write(" %s %s%s %d:%s\n" % ( |
1010 prefix, bmark, pad, repo.changelog.rev(n), hexfn(n)), |
1011 prefix, bmark, pad, repo.changelog.rev(n), hexfn(n)), |
1011 label=label) |
1012 label=label) |
|
1013 |
1012 |
1014 @command('branch', |
1013 @command('branch', |
1015 [('f', 'force', None, |
1014 [('f', 'force', None, |
1016 _('set branch name even if it shadows an existing branch')), |
1015 _('set branch name even if it shadows an existing branch')), |
1017 ('C', 'clean', None, _('reset branch name to parent branch name'))], |
1016 ('C', 'clean', None, _('reset branch name to parent branch name'))], |