简体   繁体   English

SVN符号链接对Linux和Windows透明

[英]SVN symbolic links transparent to Linux and Windows

This is how my SVN looks like now 这就是我的SVN现在的样子

SVN
 + trunk
     + src
     + pom.xml

and I want to add 我想添加

 + trunk_alternative_pom
     + src -> SVN/trunk/src
     + pom.xml

so when I update the project (in Linux or Windows), it will look like both "src" folders are completely unrelated, although behind the scenes (inside SVN) they are the same. 因此,当我更新项目(在Linux或Windows中)时,看起来两个“ src”文件夹是完全不相关的,尽管在幕后(在SVN内部)它们是相同的。

It's important that the original trunk has not a single byte modified. 重要的是原始主干没有修改过一个字节。 Assume I can't add pom_alternative.xml to trunk and run Maven with a -f argument, 假设我无法将pom_alternative.xml添加到中继并使用-f参数运行Maven,

You will need to use svn:externals to point trunk_alternative_pom/src at SVN/trunk/src 您将需要使用svn:externalstrunk_alternative_pom/src指向SVN/trunk/src

If all clients were using a UNIX-like OS (Linux, MacOS, etc.) you could use a symlink, but SVN on Windows doesn't support symlinks (and NTFS only started supporting it with Windows Vista). 如果所有客户端都使用类似UNIX的操作系统(Linux,MacOS等),则可以使用符号链接,但是Windows上的SVN不支持符号链接(并且NTFS仅在Windows Vista中开始支持它)。

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

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