[Erp5-report] r38109 nicolas.dumazet - /erp5/trunk/products/ERP5Subversion/SubversionClient.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Sep 1 16:20:05 CEST 2010
Author: nicolas.dumazet
Date: Wed Sep 1 16:20:03 2010
New Revision: 38109
URL: http://svn.erp5.org?rev=38109&view=rev
Log:
make sure that pysvn Client ignores user-specific customizations
Modified:
erp5/trunk/products/ERP5Subversion/SubversionClient.py
Modified: erp5/trunk/products/ERP5Subversion/SubversionClient.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Subversion/SubversionClient.py?rev=38109&r1=38108&r2=38109&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Subversion/SubversionClient.py [utf8] (original)
+++ erp5/trunk/products/ERP5Subversion/SubversionClient.py [utf8] Wed Sep 1 16:20:03 2010
@@ -211,7 +211,19 @@ try:
timeout = 60 * 5
def __init__(self, container, **kw):
- self.client = pysvn.Client()
+ # pysvn.Client() uses the system configuration.
+ # which means that if one sets for example a global
+ # diff-cmd = /usr/bin/colordiff
+ # in his ~/.subversion/config , this pysvn client
+ # will call colordiff when creating diffs, and will
+ # fail and crash when trying to parse the diff output since it
+ # will contain unexpected color codes.
+ # The workaround is to pass a config directory to pysvn.Client:
+ # if this config directory does not contain a valid config file,
+ # pysvn falls back to the safe default configuration.
+ path_without_config = os.getcwd()
+ self.client = pysvn.Client(path_without_config)
+
self.client.set_auth_cache(0)
obj = self.__of__(container)
self.client.exception_style = 1
More information about the Erp5-report
mailing list