# HG changeset patch # User David Soria Parra # Date 1298323332 -3600 # Node ID c1b80802081917e45fd36fefb13e285eee8dc2fc # Parent 3d3661df05e534ac65069c23dcb43878aa0470b8 bookmarks: issue a warning if remote doesn't support comparing bookmarks We want to issue a warning and abort comparing bookmarks if remote doesn't support it. Otherwise hg out -B will list you outgoing bookmarks that cannot be pushed to the remote repository using hg push -B. diff -r 3d3661df05e5 -r c1b808020819 mercurial/commands.py --- a/mercurial/commands.py Mon Feb 21 11:24:23 2011 -0600 +++ b/mercurial/commands.py Mon Feb 21 22:22:12 2011 +0100 @@ -2502,6 +2502,9 @@ source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) other = hg.repository(hg.remoteui(repo, opts), source) + if 'bookmarks' not in other.listkeys('namespaces'): + ui.warn(_("remote doesn't support bookmarks\n")) + return 0 ui.status(_('comparing with %s\n') % url.hidepassword(source)) return bookmarks.diff(ui, repo, other) @@ -2786,6 +2789,9 @@ dest = ui.expandpath(dest or 'default-push', dest or 'default') dest, branches = hg.parseurl(dest, opts.get('branch')) other = hg.repository(hg.remoteui(repo, opts), dest) + if 'bookmarks' not in other.listkeys('namespaces'): + ui.warn(_("remote doesn't support bookmarks\n")) + return 0 ui.status(_('comparing with %s\n') % url.hidepassword(dest)) return bookmarks.diff(ui, other, repo)