# HG changeset patch # User James McKay # Date 1278264080 -3600 # Node ID 4375d37fea1e4a6de34c726428db695fcf92f535 # Parent 8e621dbb82d4363a85317638ad237e2817c56347 svnrepo: fix issue 187: ignore pushable bookmarks in hg 1.6 Mercurial 1.6 introduces two new methods for repo subclasses -- pushkey and listkeys -- to support pushing/pulling bookmarks between hg repositories. (See mpm's blog post http://www.selenic.com/blog/?p=644 for details.) Unfortunately, these are only defined in the subclasses, and not in the repo base class. Perhaps the bookmarks extension should also be checking the repo for pushkeys capability by calling repo.capable('pushkey') to check. It doesn't. In the meantime, we can implement these ourselves. svnrepo should declare these methods since it is derived directly from repo. They do nothing -- listkeys merely returns an empty dictionary; pushkey returns False; this is the behaviour of httprepo or sshrepo when the remote end is running an earlier version of Mercurial. svnlocalrepo should not declare these methods since it derives from a subclass of localrepo, which already will have them, unless some other badly behaved extensions are doing something intensely weird. diff --git a/hgsubversion/svnrepo.py b/hgsubversion/svnrepo.py --- a/hgsubversion/svnrepo.py +++ b/hgsubversion/svnrepo.py @@ -125,6 +125,12 @@ class svnremoterepo(mercurial.repo.repos """ raise hgutil.Abort('command unavailable for Subversion repositories') + def pushkey(self, namespace, key, old, new): + return False + + def listkeys(self, namespace): + return {} + def instance(ui, url, create): if url.startswith('http://') or url.startswith('https://'): try: