简体   繁体   English

列出包含外部的 svn 路径

[英]List a svn path that includes externals

Note: This might be a duplicate of: "svn list" ignores externals If you deem it so please mark and close it.注意:这可能是以下内容的重复: "svn list" ignores externals如果您认为如此,请标记并关闭它。

Does SVN allow or have a tool for listing paths that include externals in them? SVN 是否允许或有一个工具来列出包含外部的路径?

I am writing a tool to allow remote svn repositories to be handled as a filesystem, but currently trying to list a path with an external will show an error.我正在编写一个工具来允许将远程 svn 存储库作为文件系统处理,但目前尝试列出带有外部的路径将显示错误。

Example: 
> svn list svn://example.com/path/external/path 
svn: warning: W160013: URL svn://example.com/path/external/path' non-existent in revision 12345
svn: E200009: Could not list all targets because some targets don't exist

Currently I am using a workaround that works something similar to:目前我正在使用类似于以下内容的解决方法:

traversed = '';
while (file = path.next()) {
    if (svn.exists(file))
        traversed = path.join(traversed, file);
    else if(svn.externals(traversed).includes(file))
        traversed = path.join(traversed, file);  //Automatically normalizes path
    else
        throw; //An actually invalid path
}

//Here you can use 'traversed' as an actually valid path

But considering that I constantly need to request things from the server here, this will not scale well, especially if the internet connection becomes dodgy.但是考虑到我经常需要从这里的服务器请求东西,这不会很好地扩展,特别是如果互联网连接变得不可靠。

I have seen the post above, and it seems that back in 2007 they were planning to fix this, but so far I am unable to find neither a fix, nor a tool that would do this in a simpler way.我看过上面的帖子,似乎早在 2007 年他们就计划解决这个问题,但到目前为止,我既找不到修复方法,也找不到可以以更简单的方式执行此操作的工具。

I am using CentOS with it's svn yum package (v1.12.2)我正在使用 CentOS 及其 svn yum 包 (v1.12.2)

Edit: I need (when listing a path) for externals to act as symlinks.编辑:我需要(在列出路径时)让外部对象充当符号链接。 Meaning意义

svn list svn://example.com/path1/external/path3
should act same as
svn list svn://example.com/path2/actual_external_path/path3

The svn list supports the --include-externals option. svn list支持--include-externals选项。 By default svn list does not display externals.默认情况下svn list不显示外部信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM