changeset 877:2c9f4c1686fa

svnrepo: don't break on old hg versions that lack pushkey
author Augie Fackler <raf@durin42.com>
date Fri, 20 Apr 2012 18:33:39 -0500
parents b450448a9033
children 6cee57ad9045
files hgsubversion/svnrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnrepo.py
+++ b/hgsubversion/svnrepo.py
@@ -84,7 +84,7 @@ def generate_repo_class(ui, repo):
         def svn_commitctx(self, ctx):
             """Commits a ctx, but defeats manifest recycling introduced in hg 1.9."""
             hash = self.commitctx(ctxctx(ctx))
-            if phases is not None:
+            if phases is not None and getattr(self, 'pushkey', False):
                 # set phase to be public
                 self.pushkey('phases', self[hash].hex(), str(phases.draft), str(phases.public))
             return hash