[Erp5-report] r7449 - /erp5/trunk/products/ERP5Subversion/Tool/SubversionTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 23 15:05:19 CEST 2006


Author: chris
Date: Tue May 23 15:05:11 2006
New Revision: 7449

URL: http://svn.erp5.org?rev=7449&view=rev
Log:
- 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.

Modified:
    erp5/trunk/products/ERP5Subversion/Tool/SubversionTool.py

Modified: erp5/trunk/products/ERP5Subversion/Tool/SubversionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Subversion/Tool/SubversionTool.py?rev=7449&r1=7448&r2=7449&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Subversion/Tool/SubversionTool.py (original)
+++ erp5/trunk/products/ERP5Subversion/Tool/SubversionTool.py Tue May 23 15:05:11 2006
@@ -133,7 +133,7 @@
   pass
 
 class SubversionNotAWorkingCopyError(Exception):
-  """The base exception class when business template is unknown.
+  """The base exception class when directory is not a working copy
   """
   pass
 
@@ -713,8 +713,13 @@
             return wc_path
           else:
             return os.sep.join(wc_path.split(os.sep)[:-1])
-    raise SubversionUnknownBusinessTemplateError, "Could not find '"+\
-    bt_name+"' at first level of working copies."
+    if os.path.isdir(os.path.join(working_copy, '.svn')):
+      raise SubversionUnknownBusinessTemplateError, "Could not find '"+\
+      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):
     """ Check if the given path is reachable (allowed)




More information about the Erp5-report mailing list