You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Grégoire Welraeds <gr...@side-international.com> on 2005/09/08 12:50:11 UTC

subversion link capability

hi there,

I'm bit disappointed by the following problem:
We have our code stored in several subversion repositories (svn
installed under debian, version 1.2.0 soon to be migrated to 1.2.3).
We were previously working* with SourceSafe and we have happily migrated
some of our project to subversion.
One of the developper contacted me with a question today and I don't
know what to tell him.

In a project, he has file y in directory a which is a copy of file x in
directory b. These files must be identical to each other when commiting
changes to the repository otherwise it could break the application or at
least produce some unexpected side effects. In SourceSafe, this was an
easy situation as it seems that one can tell SourceSafe that file y is a
link to file x and when checking one of the file, the other is
automatically updated (I know almost nothing about SourceSafe). Since
the project was migrated to svn, he now have to __manually__ copy the
file before performing the commit. There is no need to think a long time
to understand that this situation is prone to errors.

At first, I told the developper that this was a bad idea to have the
same file copied from to directories in the same project and that having
a single file in a shared place would be a better design (in this case,
the file is a header file). The problem is that since this bad habbit
was well supported by source SourceSafe, it seems that there are a lot
of similar situations in the code which is still in SourceSafe and that
we would like to move to svn. As a consequence, migrating the remaining
project would request a lot of work as #include directives are to  be
checked and makefiles have to be changed. Unfortunatly these projects
are several thousand lines of code.

I then had a look at svn:externals property but it only apply to
directories, so it is only partially helpfull in our case. I know that
subversion supports the Unix symlink but our applications are
multi-platforms and mainly developped under windows.

I also thought to implement a post-commit hook which would look in a
manually maintained list of copied file and then perform a svn copy each
time a commited file is found in the list. But I'm far from convinced
that this would be a good solution.

I know I'm not the only one to have the problem (see
http://svn.haxx.se/users/archive-2005-05/1342.shtml for example). I
haven't find a acceptable solution to this problem and I have not found
any reference to a future development that would solve this problem.

Any clue?

TIA and regards,

-- 
Grégoire Welraeds

All code is not created equal.
Qc engineer, S I D E



Re: subversion link capability

Posted by Vincent Starre <vs...@comcast.net>.
[boing]

>Subversion supports symlinks, so you could change one half of each
>pair to a symlink.
>
>Josh
>  
>
Does subversion support server-side-only symlinks? that is, symlinks 
which exist in the repository only, and checking out a directory would 
check out the actual file? ( = support for "symlinks" on non-unix 
systems & support for "linked files" without needing to check out both 
the "link" and the "file")

I've often had the need to either check out single files from another 
directory or the desire to exclude certain files depending on operating 
system. There are many obvious and simple ways to add these features 
either in reality or as client-side hacks, but if there is a non-hack 
way for mere mortals to add such a thing, let me at it.

(anyone mentioning svn:externals or other "whole-directory" operations 
will be shot by god himself, with a gun)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: subversion link capability

Posted by Grégoire Welraeds <gr...@side-international.com>.
Joshua Varner wrote:

>
> Subversion supports symlinks, so you could change one half of each
> pair to a symlink.
>
> Josh

Symlinks are only available under Unix. There is still a problem when
stuck with windows.
And there is no uniform portable solution provided by subversion.

Is there any plan to address this (link/shared/whatever) issue in
future developments ?
Also are there any workaround that I could apply in my case ?

Thank you for your advice.

Grégoire.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: subversion link capability

Posted by Joshua Varner <jl...@gmail.com>.
On 9/8/05, Grégoire Welraeds <gr...@side-international.com> wrote:
[snip]
>  
>  In a project, he has file y in directory a which is a copy of file x in
> directory b. These files must be identical to each other when commiting
> changes to the repository otherwise it could break the application or at
> least produce some unexpected side effects. In SourceSafe, this was an easy
> situation as it seems that one can tell SourceSafe that file y is a link to
> file x and when checking one of the file, the other is automatically updated
> (I know almost nothing about SourceSafe). Since the project was migrated to
> svn, he now have to __manually__ copy the file before performing the commit.
> There is no need to think a long time to understand that this situation is
> prone to errors.
>  
>  At first, I told the developper that this was a bad idea to have the same
> file copied from to directories in the same project and that having a single
> file in a shared place would be a better design (in this case, the file is a
> header file). 

Agreed, but some things are out of our control.

[snip]
>  Any clue? 
>  

Subversion supports symlinks, so you could change one half of each
pair to a symlink.

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org