gpt4 book ai didi

svn - 在SVN中创建链接文件

转载 作者:行者123 更新时间:2023-12-04 13:42:57 25 4
gpt4 key购买 nike

我在 Windows XP 上使用 SVN。

情况:SVN作为文件归档。我有一些文件需要组织到不同的文件夹中,但仍保留原始文件结构。

Example: In a folder called "Templates"

File1.doc
File2.doc
File3.xls
File4.xls

现在,我希望将它们组织在不同的文件夹中:

Templates\Type1
File1.doc -> ..\File1.doc
File2.doc -> ..\File2.doc
File3.xls -> ..\File3.xls

Templates\Type2
File1.doc -> ..\File2.doc
File2.doc -> ..\File1.doc
File3.xls -> ..\File4.xls

当Templates文件夹中的文件被修改时,Type*文件夹中的文件指向正确的文件。

如何在 SVN 中实现这一点?还有其他替代方法吗?

最佳答案

查看有关符号链接(symbolic link)的颠覆文档 here .

引用链接页面,强调我的:

Versioning Symbolic Links

On non-Windows platforms, Subversion is able to version files of the special type symbolic link (or “symlink”). A symlink is a file that acts as a sort of transparent reference to some other object in the filesystem, allowing programs to read and write to those objects indirectly by way of performing operations on the symlink itself.

When a symlink is committed into a Subversion repository, Subversion remembers that the file was in fact a symlink, as well as the object to which the symlink “points.” When that symlink is checked out to another working copy on a non-Windows system, Subversion reconstructs a real filesystem-level symbolic link from the versioned symlink. But that doesn't in any way limit the usability of working copies on systems such as Windows that do not support symlinks. On such systems, Subversion simply creates a regular text file whose contents are the path to which to the original symlink pointed. While that file can't be used as a symlink on a Windows system, it also won't prevent Windows users from performing their other Subversion-related activities.

关于svn - 在SVN中创建链接文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7495885/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com