##// END OF EJS Templates
svn: fix subprocess problems on some of the calls for file checking.
milka -
r926:8b3be25b default
parent child
Show More
@@ -38,6 +38,7 import svn.repos
38 from vcsserver import svn_diff, exceptions, subprocessio, settings
38 from vcsserver import svn_diff, exceptions, subprocessio, settings
39 from vcsserver.base import RepoFactory, raise_from_original, ArchiveNode, archive_repo
39 from vcsserver.base import RepoFactory, raise_from_original, ArchiveNode, archive_repo
40 from vcsserver.exceptions import NoContentException
40 from vcsserver.exceptions import NoContentException
41 from vcsserver.utils import safe_str
41 from vcsserver.vcs_base import RemoteBase
42 from vcsserver.vcs_base import RemoteBase
42
43
43 log = logging.getLogger(__name__)
44 log = logging.getLogger(__name__)
@@ -483,9 +484,7 class SvnRemote(RemoteBase):
483 if path and os.path.isdir(path):
484 if path and os.path.isdir(path):
484 opts['cwd'] = path
485 opts['cwd'] = path
485
486
486 safe_call = False
487 safe_call = opts.pop('_safe', False)
487 if '_safe' in opts:
488 safe_call = True
489
488
490 svnenv = os.environ.copy()
489 svnenv = os.environ.copy()
491 svnenv.update(opts.pop('extra_env', {}))
490 svnenv.update(opts.pop('extra_env', {}))
@@ -499,7 +498,7 class SvnRemote(RemoteBase):
499 return ''.join(p), ''.join(p.error)
498 return ''.join(p), ''.join(p.error)
500 except (EnvironmentError, OSError) as err:
499 except (EnvironmentError, OSError) as err:
501 if safe_call:
500 if safe_call:
502 return '', err
501 return '', safe_str(err).strip()
503 else:
502 else:
504 cmd = ' '.join(cmd) # human friendly CMD
503 cmd = ' '.join(cmd) # human friendly CMD
505 tb_err = ("Couldn't run svn command (%s).\n"
504 tb_err = ("Couldn't run svn command (%s).\n"
General Comments 0
You need to be logged in to leave comments. Login now