Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create link file in SVN

I use SVN on Windows XP.

Situation: SVN as document archive. I have a few files that need to be organized into various folders and yet retain the orginal file structure.

Example: In a folder called "Templates"

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

Now, I want these to be organized in different folders:

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

When the files in the Templates folder are modified, the files in the Type* folders point to the right file.

How can I achieve this in SVN? Is there any other alternative way to do this?

like image 285
Krishna Avatar asked Dec 07 '25 06:12

Krishna


1 Answers

Take a look at the subversion documentation on symbolic links here.

Quote from linked page, emphasis mine:

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.

like image 108
Antonio Pérez Avatar answered Dec 08 '25 22:12

Antonio Pérez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!