检查svn存储库url不存在 [英] Check that an svn repository url does not exist

查看:643
本文介绍了检查svn存储库url不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个脚本,它将根据用户提供的名称在存储库中添加一个新项目。其中一部分涉及检查存储库中是否不存在具有相同名称的网址。



在存储库中,我们团队的所有项目都存储在

https://developernetwork.repo .net / svn / Projects /



假设用户想要调用项目Calculator并运行脚本。在这种情况下,我们需要确保存储库中不存在以下内容。



https://developernetwork.repo.net/svn/Projects/Calculator/



有没有svn命令,我可以使用来完成它?很遗憾,我无法看到可以在svn文档中使用的相应命令( http ://svnbook.red-bean.com/en/1.0/svn-book.html )。

解决方案

您只需使用

  svn ls https://developernetwork.repo.net/svn/Projects/Calculator/ 

它会告诉你存储库(目录)是否存在。



更新



可以使用许多文件的目录:

  svn ls http:// server / svn / foo --depth empty 


I am writing a script which will add a new project in the repository, based on the name supplied by the user. Part of this involves checking that an url with the same name does not already exist on the repository.

In the repository, all the projects of our team are stored in

https://developernetwork.repo.net/svn/Projects/

Let's say that the user wants to call the project "Calculator" and runs the script. In this case, we need to ensure that the following does not already exist in the repository

https://developernetwork.repo.net/svn/Projects/Calculator/

Is there an svn command which I can use to accomplish that? Unfortunately I cannot see an appropriate command I can use in the svn documentation (http://svnbook.red-bean.com/en/1.0/svn-book.html) at all.

解决方案

You can just use

svn ls https://developernetwork.repo.net/svn/Projects/Calculator/

It will tell you if the repository(directory) exist or not.

Update

for directories with many files use:

svn ls http://server/svn/foo --depth empty

这篇关于检查svn存储库url不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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