Commit 5edeb6dc authored by Nicolas Dumazet's avatar Nicolas Dumazet

make sure that pysvn Client ignores user-specific customizations


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38109 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a4f99f09
...@@ -211,7 +211,19 @@ try: ...@@ -211,7 +211,19 @@ try:
timeout = 60 * 5 timeout = 60 * 5
def __init__(self, container, **kw): 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) self.client.set_auth_cache(0)
obj = self.__of__(container) obj = self.__of__(container)
self.client.exception_style = 1 self.client.exception_style = 1
......
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