SVN Ant 更新示例 [英] SVN Ant Update example

查看:30
本文介绍了SVN Ant 更新示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Ant 的新手,我想做一个 SVN 更新操作.我将 jar 文件添加到 ant/lib 文件夹中,我还在 build.xml 文件中添加了 typedef 属性.

I'm quite new in Ant and i want to make an SVN Update operation. I add the jar files into the ant/lib folder, also i add the typedef property in my build.xml file.

<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpath="ant/lib/svnant.jar;ant/lib/svnClientAdapter.jar;ant/lib/svnkit.jar;ant/lib/svnjavahl.jar" />

但是现在我需要一些代码示例来从一个文件夹的存储库进行更新(假设文件夹名称是 test)我查看了互联网,但此 svn ant 调用提供了一些示例.

But now I need some code example for making update from repository at one folder (let's say the folder name is test) I look over internet but a few examples are provided with this svn ant call.

我试过这样的事情

<target name="svn-update">
    <svn username="test" password="*****">
        <update revision="HEAD" dir="com.project.blackbox.eclipse" />
    </svn>
</target>

推荐答案

您的 typedef 是正确的.

You have the typedefs right.

您要做的是更新到 SVN 未检出的目录.这意味着您的dir"属性中可能包含错误的目录.

What you are trying to do is update to a directory which wasn't checked out by SVN. This means that your likely have the wrong directory in your "dir" attribute.

如果您的dir"属性指向项目的根目录,则很可能是错误的.您可能已检出到项目根目录下的src"文件夹.

If your "dir" attribute points to the project's root directory, odds are it is wrong. You likely checked out to a "src" folder under the project's root directory.

查看项目的根目录(通常在工作区根"目录下,在与项目同名的目录中).查找任何包含.svn"隐藏目录的子目录.很可能您只从一个存储库中签出,所以如果这是真的,那么您找到的第一个可能是您打算包含在dir"指令中的目录.

Look in the Project's root directory (typically it is under the Workspace "root" directory, in a directory with the same name as the project). Look for any subdirectories that contain a ".svn" hidden directory. Odds are you only checked out from one repository, so if that's true then the first one you find will likely be the directory you meant to include in the "dir" directive.

如果您有多个目录可供选择,请在命令行执行svn info".对于每个候选目录,您很快就可以将它们分类.

If you have multiple directories to select from, at the command line do a "svn info ." for each candidate directory and you will soon be able to sort them out.

这篇关于SVN Ant 更新示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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