+ -
当前位置:首页 → 问答吧 → pysvn 中update如何更新之前版本

pysvn 中update如何更新之前版本

时间:2011-09-23

来源:互联网

比如我当前版本 165版本
我的工作副本为:F:\MySvnClient\test
如何在本地副本上update 163版本呢?

totalfile = r"F:\MySvnClient\test"
totalfile = unicode(totalfile,'utf-8')
client = pysvn.Client()

totallog = client.log(totalfile)
mylog = client.log(myfile,discover_changed_paths=True,strict_node_history = True,limit =4)
t = totallog[2].revision
x = totallog[0].revision
print t,x 

现在t为163版本的对象,x为165版本的对象。
client.update(totalfile,t)
然后应该怎么处理呢???
急求!!!

作者: bent1ey   发布时间: 2011-09-23

大概这么个意思:
Python code
client.update(path, revision=pysvn.Revision(pysvn.opt_revision_kind.number, 4721))

具体自己看下官方手册吧。

作者: iambic   发布时间: 2011-09-23

引用 1 楼 iambic 的回复:
大概这么个意思:

Python code
client.update(path, revision=pysvn.Revision(pysvn.opt_revision_kind.number, 4721))

具体自己看下官方手册吧。


1楼。
 client.update(path,revison)
第二个参数应该写什么?
是我写的 t 还是写 pysvn.Revision(t.number,4721)呢?

作者: bent1ey   发布时间: 2011-09-23

Python code
client.update(totalfile, revision=t)

作者: iambic   发布时间: 2011-09-23

用python来update svn 没有试过,学习下!

作者: yueding648916454   发布时间: 2011-09-23

引用 3 楼 iambic 的回复:

Python code
client.update(totalfile, revision=t)

哦。谢谢了。

作者: bent1ey   发布时间: 2011-09-23

热门下载

更多