Python 请求分支时对SVN根的pysvn请求
问题:更新a b时ranchhttp://svn.exemple.com/root/workspace/branch 使用pysvn.Client,它请求svnroothttp://svn.exemple.com/root,并收到应得的错误403禁止 它发生在linux-2.6redhat-5.6-Final上,当我在Windows7上测试时,代码运行良好 代码如下:Python 请求分支时对SVN根的pysvn请求,python,svn,pysvn,Python,Svn,Pysvn,问题:更新a b时ranchhttp://svn.exemple.com/root/workspace/branch 使用pysvn.Client,它请求svnroothttp://svn.exemple.com/root,并收到应得的错误403禁止 它发生在linux-2.6redhat-5.6-Final上,当我在Windows7上测试时,代码运行良好 代码如下: def _initClient(self): self._client = pysvn.Client() sel
def _initClient(self):
self._client = pysvn.Client()
self._client.exception_style = 1
self._client.set_default_username(self.configObj.SVN_USER)
self._client.set_default_password(self.configObj.SVN_PASSWD)
try:
self.cur_revision_number = self._client.info(self._workcopy)["revision"].number
except pysvn.ClientError:
self.cur_revision_number = self._client.checkout(self.configObj.SVN_SERVER,self._workcopy).number
def update(self, pathname=None, **kwargs):
'''
Update workcopy
Extra kwargs are:
recurse=True,
revision=version("head"),
ignore_externals=False,
depth=depth
'''
if not pathname:
path = self._workcopy
elif os.path.isabs(pathname):
path = pathname
if self._workcopy not in path:
raise ValueError("Unkown workcopy \"%s\"" % pathname)
else:
path = os.path.join(self._workcopy, pathname)
self.cur_revision_number = self._client.update(
path, **kwargs
)[-1].number
我发现文件导致了这个问题: 媒体/门户/图像/favicon.ico 具有 svn版本:1.6.11 pysvn版本:1.7.6 Apache可能会将其重定向到/favicon.ico