Is it possible to link SVN repository files so that a file is actually a reference to another repository's file?

Viewed 62663

I can see some potential difficulties with this concept but the idea is:

I change a file in Repository A and commit, Repository B has a file that is a link to a file in Repository A, I click update on the file in my working copy for repository B, and i receive the updated file from repository A.

5 Answers

Here is a solution which will synchronize all the files. Use ln command to create a hardlink and then copy that in all the folders. The method is described below (Linux).

  1. $ ln source_file.txt ~/desired_directory/first_copy.txt This will create a hard link of source_file.txt and put a copy in desired_directory.
  2. Repeat the same process to produce multiple copies of the same file (actually it's simply linking of file) and put it in the any directory you like.
  3. Update the source_file.txt and it will update all other linked files as well.

Cheers.

For Windows, one may use mklink to link files.

Related