##// END OF EJS Templates
commands.bookmarks: separate out 'no bookmarks set' status messages...
Siddharth Agarwal -
r20231:1053f5a7 default
parent child Browse files
Show More
@@ -906,31 +906,31 b' def bookmark(ui, repo, *names, **opts):'
906 bookmarks.unsetcurrent(repo)
906 bookmarks.unsetcurrent(repo)
907 marks.write()
907 marks.write()
908
908
909 # Same message whether trying to deactivate the current bookmark (-i
910 # with no NAME) or listing bookmarks
911 elif len(marks) == 0:
912 ui.status(_("no bookmarks set\n"))
913
914 elif inactive:
909 elif inactive:
915 if not repo._bookmarkcurrent:
910 if len(marks) == 0:
911 ui.status(_("no bookmarks set\n"))
912 elif not repo._bookmarkcurrent:
916 ui.status(_("no active bookmark\n"))
913 ui.status(_("no active bookmark\n"))
917 else:
914 else:
918 bookmarks.unsetcurrent(repo)
915 bookmarks.unsetcurrent(repo)
919
916
920 else: # show bookmarks
917 else: # show bookmarks
921 for bmark, n in sorted(marks.iteritems()):
918 if len(marks) == 0:
922 current = repo._bookmarkcurrent
919 ui.status(_("no bookmarks set\n"))
923 if bmark == current:
920 else:
924 prefix, label = '*', 'bookmarks.current'
921 for bmark, n in sorted(marks.iteritems()):
925 else:
922 current = repo._bookmarkcurrent
926 prefix, label = ' ', ''
923 if bmark == current:
927
924 prefix, label = '*', 'bookmarks.current'
928 if ui.quiet:
925 else:
929 ui.write("%s\n" % bmark, label=label)
926 prefix, label = ' ', ''
930 else:
927
931 ui.write(" %s %-25s %d:%s\n" % (
928 if ui.quiet:
932 prefix, bmark, repo.changelog.rev(n), hexfn(n)),
929 ui.write("%s\n" % bmark, label=label)
933 label=label)
930 else:
931 ui.write(" %s %-25s %d:%s\n" % (
932 prefix, bmark, repo.changelog.rev(n), hexfn(n)),
933 label=label)
934
934
935 @command('branch',
935 @command('branch',
936 [('f', 'force', None,
936 [('f', 'force', None,
General Comments 0
You need to be logged in to leave comments. Login now