Mercurial > hg
comparison hgext/bookmarks.py @ 11994:31dde4c3bb83 stable
bookmarks: Check if the bookmark to delete exists on the remote
author | David Soria Parra <dsp@php.net> |
---|---|
date | Thu, 19 Aug 2010 15:04:21 -0400 |
parents | 18c47562d331 |
children | 4b1197f15313 1938954354ec |
comparison
equal
deleted
inserted
replaced
11992:ccd8e592c3c5 | 11994:31dde4c3bb83 |
---|---|
440 for b in opts['bookmark']: | 440 for b in opts['bookmark']: |
441 # explicit push overrides remote bookmark if any | 441 # explicit push overrides remote bookmark if any |
442 if b in repo._bookmarks: | 442 if b in repo._bookmarks: |
443 ui.status(_("exporting bookmark %s\n") % b) | 443 ui.status(_("exporting bookmark %s\n") % b) |
444 new = repo[b].hex() | 444 new = repo[b].hex() |
445 else: | 445 elif b in rb: |
446 ui.status(_("deleting remote bookmark %s\n") % b) | 446 ui.status(_("deleting remote bookmark %s\n") % b) |
447 new = '' # delete | 447 new = '' # delete |
448 else: | |
449 ui.warn(_('bookmark %s does not exist on the local or remote repository!\n') % b) | |
450 return 2 | |
448 old = rb.get(b, '') | 451 old = rb.get(b, '') |
449 r = other.pushkey('bookmarks', b, old, new) | 452 r = other.pushkey('bookmarks', b, old, new) |
450 if not r: | 453 if not r: |
451 ui.warn(_('updating bookmark %s failed!\n') % b) | 454 ui.warn(_('updating bookmark %s failed!\n') % b) |
452 if not result: | 455 if not result: |