[PATCH] bookmarks: add bookmarks-remote command to show bookmarks from a remote repo
sn_ at gmx.net
sn_ at gmx.net
Thu Jun 17 18:03:05 CDT 2010
# HG changeset patch
# User David Soria Parra <dsp at php.net>
# Date 1276814769 -7200
# Node ID 0b94edc08ea272071082664715a36f0977da3d73
# Parent e1a145eebb6ab6893603a02e12538b15db41a9f5
bookmarks: add bookmarks-remote command to show bookmarks from a remote repo
diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py
--- a/hgext/bookmarks.py
+++ b/hgext/bookmarks.py
@@ -83,6 +83,19 @@
wlock.release()
repo._bookmarkcurrent = mark
+def bookmarksremote(ui, repo, dest=None):
+ '''list bookmarks of a remote repository'''
+ repopath = ui.expandpath(dest or 'default-push', dest or 'default')
+ target = hg.repository(ui, repopath)
+ listkeys = target.listkeys('bookmarks')
+ if not listkeys:
+ ui.write("no bookmarks set at %s\n" % repopath)
+ else:
+ for k, v in listkeys.iteritems():
+ ui.write(" %-25s %s\n" % (k.encode('string-escape'),
+ short(k.encode('string-escape'))))
+
+
def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, rename=None):
'''track a line of development with movable markers
@@ -473,6 +486,10 @@
return res
cmdtable = {
+ "bookmarks-remote":
+ (bookmarksremote,
+ [],
+ _('hg bookmarks-remote [REPO]')),
"bookmarks":
(bookmark,
[('f', 'force', False, _('force')),
More information about the Mercurial-devel
mailing list