info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'soft links' in cvs repository?


From: Ted Stern
Subject: Re: 'soft links' in cvs repository?
Date: Wed, 05 Mar 2008 14:54:59 -0800
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

On 05 Mar 2008 08:10:22 -0800, newbie wrote:
>
> Hi Group,
>
> Is there any way to use one file in different cvs repositories while
> keep it synced? (just like a soft link to the file).
>
> Let's say I have three files A, B, C. What I want to do is I need to
> put A, B in a repository 1, meanwhile I need to put A, C in another
> repository 2, but file A should be the same here. Whenever I commit
> changes for A from a checkout of repo 1, it should also be changed in
> repo 2. File A in repo 1 is just a soft link to repo 2.
>
> Any hints on this? Hope I was clear.
>
> Thanks.

Hmm, I think I can imagine a gross hack to make it work, but I
strongly recommend avoiding it.  What you want to do is symlink
directories if you can:

   /path/to/repos1/module1/A_dir/A,v
   /path/to/repos1/module1/B_dir/B,v
   /path/to/repos1/module1/C_dir/C,v

   cd /path/to/repos2/module2
   ln -s /path/to/repos1/module1/A_dir .

yields the following

   /path/to/repos2/module2/A_dir -> /path/to/repos1/module1/A_dir

The reason I would recommend using directories instead of symlinking
files directly is that you can never be sure when CVS might move files
around.

Completely untested --- do your own experiments on a test repository
first.

Ted
-- 
 dodecatheon at gmail dot com
 Frango ut patefaciam -- I break so that I may reveal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]