changeset 1377:2ae4fb5bfab9 stable

svncommands: cope with aa73d6a5d9ea which removed optionalrepo We manually set the optionalrepo attr rather than migrate to the decorator form. Soon we should do that migration.
author Augie Fackler <raf@durin42.com>
date Wed, 02 Mar 2016 22:00:00 -0500
parents 717bf096197e
children e1619c051788 2f98d1e85c23
files hgsubversion/__init__.py hgsubversion/svncommands.py
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/__init__.py
+++ b/hgsubversion/__init__.py
@@ -195,7 +195,8 @@ hg.schemes.update({ 'file': _lookup, 'ht
                     'svn': svnrepo, 'svn+ssh': svnrepo, 'svn+http': svnrepo,
                     'svn+https': svnrepo})
 
-commands.optionalrepo += ' svn'
+if hgutil.safehasattr(commands, 'optionalrepo'):
+    commands.optionalrepo += ' svn'
 
 cmdtable = {
     "svn":
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -490,6 +490,9 @@ def svn(ui, repo, subcommand, *args, **o
         else:
             raise
 
+svn.optionalrepo=True
+svn.norepo = False
+
 table = {
     'genignore': genignore,
     'info': info,