Commit 6e3101c9 authored by Sebastien Robin's avatar Sebastien Robin

ERP5VCS: completely disable Subversion if pysvn is not present

parent 069cfdf1
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
############################################################################## ##############################################################################
import errno, glob, os, re, shutil import errno, glob, os, re, shutil
from pysvn import ClientError, Revision, opt_revision_kind, svn_err
import threading import threading
from ZTUtils import make_query from ZTUtils import make_query
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
...@@ -71,7 +72,6 @@ class Subversion(WorkingCopy): ...@@ -71,7 +72,6 @@ class Subversion(WorkingCopy):
path = self.working_copy path = self.working_copy
except AttributeError: except AttributeError:
return return
from pysvn import ClientError
try: try:
self.getRevision() self.getRevision()
except (ClientError, KeyError): except (ClientError, KeyError):
...@@ -145,7 +145,6 @@ class Subversion(WorkingCopy): ...@@ -145,7 +145,6 @@ class Subversion(WorkingCopy):
return self.aq_parent.download('.') return self.aq_parent.download('.')
def showOld(self, path): def showOld(self, path):
from pysvn import ClientError, Revision, opt_revision_kind, svn_err
try: try:
return self._getClient().cat(os.path.join(self.working_copy, path), return self._getClient().cat(os.path.join(self.working_copy, path),
Revision(opt_revision_kind.base)) Revision(opt_revision_kind.base))
......
...@@ -53,5 +53,8 @@ def initialize( context ): ...@@ -53,5 +53,8 @@ def initialize( context ):
content_classes = content_classes) content_classes = content_classes)
# Register Subversion before Git # Register Subversion before Git
from Products.ERP5VCS.Subversion import Subversion try:
from Products.ERP5VCS.Subversion import Subversion
except ImportError:
pass
from Products.ERP5VCS.Git import Git from Products.ERP5VCS.Git import Git
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment