[PATCH] bookmarks: Check if the bookmark to delete exists on the remote
David Soria Parra
dsp at experimentalworks.net
Thu Aug 19 14:08:59 CDT 2010
# HG changeset patch
# User David Soria Parra <dsp at php.net>
# Date 1282244661 14400
# Node ID 38ff17952746417610886bca950675cd4763600d
# Parent 66521d25c2a6a6c53cbe658521d28766887e73bd
bookmarks: Check if the bookmark to delete exists on the remote
diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py
--- a/hgext/bookmarks.py
+++ b/hgext/bookmarks.py
@@ -442,9 +442,12 @@
if b in repo._bookmarks:
ui.status(_("exporting bookmark %s\n") % b)
new = repo[b].hex()
- else:
+ elif b in rb:
ui.status(_("deleting remote bookmark %s\n") % b)
new = '' # delete
+ else:
+ ui.warn(_('bookmark %s does not exist on the local or remote repository!\n') % b)
+ return 2
old = rb.get(b, '')
r = other.pushkey('bookmarks', b, old, new)
if not r:
More information about the Mercurial-devel
mailing list