Note: This might be a duplicate of: "svn list" ignores externals If you deem it so please mark and close it.
Does SVN allow or have a tool for listing paths that include externals in them?
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.
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.
I am using CentOS with it's svn yum package (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. By default svn list
does not display externals.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.