如何从subversion获取最早的可结帐修订信息? [英] How to get the earliest checkout-able revision info from subversion?

查看:30
本文介绍了如何从subversion获取最早的可结帐修订信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检查一个 svn url 并获得最早的修订版,然后签出它,我不想使用 HEAD,因为我会将最早的修订版与其他修订版进行比较.

I want to check a svn url and to get the earliest revision, then checkout it, I don't want to use HEAD because I will compare the earliest revision to others.

所以我使用svn info"来获取 URL 的Last Changed Rev",如下所示:

so I use "svn info" to get the "Last Changed Rev" for the url like this:

D:\Project>svn info svn://.../branches/.../path
Path: ...
URL: svn://.../branches/.../path
Repository Root: svn://yt-file-srv/
Repository UUID: 9ed5ffd7-7585-a14e-96b2-4aab7121bb21
Revision: 2400
Node Kind: directory
Last Changed Author: xxx
Last Changed Rev: 2396
Last Changed Date: 2010-03-12 09:31:52 +0800 

但是,我发现 2396 修订版不可检出,因为此路径位于从主干复制的分支中,而 2396 是在主干中修改的修订版.所以当我使用 svn checkout -r 2396 时,我会得到一个主干中路径的工作副本,然后我就无法为分支进行签入.

but, I found the 2396 revision is not checkout-able, because this path is in a branch copied from trunk, and the 2396 is the revision modified in the trunk. so when I use svn checkout -r 2396, I will get a working copy for the path in the trunk, then I can not do checkin for the branch.

D:\Project>svn checkout svn://.../branches/.../path -r 2396 workcopy
.....
.....
D:\Project>svn info workcopy
Path: workcopy
URL: svn://.../trunk/.../path
Repository Root: svn://yt-file-srv/
Repository UUID: 9ed5ffd7-7585-a14e-96b2-4aab7121bb21
Revision: 2396
Node Kind: directory
Schedule: normal
Last Changed Author: xxx
Last Changed Rev: 2396
Last Changed Date: 2010-03-12 09:31:52 +0800

所以,我的问题是如何获得分支路径的可检出修订,在本例中,我想获得 2397(因为 2397 是发生复制的修订).

So, my question is how to get a checkout-able revision for the branch path, for this example, I want to get 2397 (because 2397 is the revision which copy occur).

而且我知道svn log"可以获得信息,但是svn log"输出可能很长并且解析它比svn info"困难.我只想知道哪个修订版是路径的最早可结帐修订版.

And I know "svn log" can get the info, but "svn log" output maybe very long and parse it will be difficult than "svn info". I just want know which revision is the earliest checkout-able revision for the path.

推荐答案

您只需要查看日志并确定分支路径是在哪个修订版中创建的,然后检查该修订版的分支.

You will just need to look at the log and determine in what revision the branch path was created, then check out the branch at that revision.

这篇关于如何从subversion获取最早的可结帐修订信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆