You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Neil Tremble <nt...@aapl.com.au> on 2005/08/12 07:21:25 UTC

VSS style sharing of files (externals, vendor branches only for directories?)

We have a large project consisting of a number of common files plus several variants. The files live in a number of directories:

    \Variant_1
      \Application
      \Bootloader
      \Drivers

    \Variant_2
      \Application
      \Bootloader
      \Drivers

    \Common_Files
      \Application
      \Bootloader
      \Drivers


The common files will be modified over time, and we would like the changes to (automatically?) reflect in the variants. The variant files will also change, but those changes must not affect any other branches.

In SourceSafe this is accomplished by sharing the common files, but from what I can see Subversion does not have sharing - if a file is a copy from another branch it will remain unaltered even if the file in the parent branch is modified.

Someone else asked a similar question in this forum previously and was told to use the externals property, but according to the SVN 1.2 documenation this only works on directories. We need it to work on individual files as not all files in every directory will be shared. Similar comment for vendor branches, that seems to want to affect all the files in a directory.

Is there any way we can share individual files? Ideally commits to the variant branches do the right thing (update the common files, perhaps after a warning).

Neil

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


Re: VSS style sharing of files (externals, vendor branches only for directories?)

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
Neil Tremble wrote:
> We have a large project consisting of a number of common files plus several
> variants. The files live in a number of directories:
>
>     \Variant_1
>       \Application
>       \Bootloader
>       \Drivers
>
>     \Variant_2
>       \Application
>       \Bootloader
>       \Drivers
>
>     \Common_Files
>       \Application
>       \Bootloader
>       \Drivers
>
>
> The common files will be modified over time, and we would like the changes
> to (automatically?) reflect in the variants. The variant files will also
> change, but those changes must not affect any other branches.
[...]
> Is there any way we can share individual files? Ideally commits to the
> variant branches do the right thing (update the common files, perhaps after
> a warning).

You could setup a post-commit hook, but I'm not sure if and how that works.

Otherwise, reflecting changes automatically in another variant is not even 
supported by VSS: you first need to commit changes before you test them in 
other variants. This is also the biggest criticism I have on the method 
itself, I'd rather build several variants from within the same folder so I 
can test then together. 
Other than that, Subversion has good merging support, so you could keep 
separate trees an manually merge changes is the common files whenever you 
work on a variant. This has the additional benefit that you could 
theoretically always checkout a variant and compile it, without having to 
care for changes in the common files that might otherwise break this build.

Seriously, we did the same here for years and the system wasn't stable by 
itself in that it always required people to consider all places where a file 
was used - more than once they didn't. The other system also relies on 
people, but this time they have to actively break things, which is much more 
rare.

YMMV - as always.

Uli

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