Commit 16722b18 authored by Christophe Dumez's avatar Christophe Dumez

- readded error message "you must do a clean checkout first". But this time we...

- readded error message "you must do a clean checkout first". But this time we test if the path is a svn working copy only if the business template could not be found in it.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7449 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1730838e
...@@ -133,7 +133,7 @@ class SubversionUnknownBusinessTemplateError(Exception): ...@@ -133,7 +133,7 @@ class SubversionUnknownBusinessTemplateError(Exception):
pass pass
class SubversionNotAWorkingCopyError(Exception): class SubversionNotAWorkingCopyError(Exception):
"""The base exception class when business template is unknown. """The base exception class when directory is not a working copy
""" """
pass pass
...@@ -713,8 +713,13 @@ class SubversionTool(BaseTool, UniqueObject, Folder): ...@@ -713,8 +713,13 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
return wc_path return wc_path
else: else:
return os.sep.join(wc_path.split(os.sep)[:-1]) return os.sep.join(wc_path.split(os.sep)[:-1])
if os.path.isdir(os.path.join(working_copy, '.svn')):
raise SubversionUnknownBusinessTemplateError, "Could not find '"+\ raise SubversionUnknownBusinessTemplateError, "Could not find '"+\
bt_name+"' at first level of working copies." bt_name+"' at first level of working copies."
else:
raise SubversionNotAWorkingCopyError, \
"You must do a clean checkout first. It seems that at least one \
of the paths given in preferences is not a SVN working copy"
def _getWorkingPath(self, path): def _getWorkingPath(self, path):
""" Check if the given path is reachable (allowed) """ Check if the given path is reachable (allowed)
......
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