Commit 4316e8b4 authored by Christophe Dumez's avatar Christophe Dumez

- Make error message more explicit when the path set in preferences in not a...

- Make error message more explicit when the path set in preferences in not a working copy (asked by yoshinori)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7287 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 43d29f25
......@@ -72,6 +72,11 @@ class SubversionUnknownBusinessTemplateError(Exception):
"""The base exception class when business template is unknown.
"""
pass
class SubversionNotAWorkingCopyError(Exception):
"""The base exception class when business template is unknown.
"""
pass
def copytree(src, dst, symlinks=False):
"""Recursively copy a directory tree using copy().
......@@ -618,6 +623,8 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
raise SubversionPreferencesError, 'Please set at least one Subversion Working Copy in preferences first.'
bt_name = bt.getTitle()
for wc in wc_list:
if not os.path.exists(os.path.join(wc, '.svn')):
raise SubversionNotAWorkingCopyError, "You must check out working copies in this directory: "+wc+" or choose another path in portal preferences."
if bt_name in os.listdir(wc) :
wc_path = os.path.join(wc, bt_name)
if os.path.isdir(wc_path):
......
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