You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Roth, Pierre" <pi...@covidien.com> on 2008/01/07 11:09:45 UTC

Shared files between projects

Hi,

Is there ( current 1.4.6 release ) or is planned ( next 1.5 svn release
) to have a "shared file" functionality with svn ?
i.e sharing files between projects (without using the svn:externals
property). One change to a file in one project would then be
automatically seen from other projects.

Does not seem to exist on 1.4.6... But perhaps in 1.5 ?

Thanks !

pierre

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


RE: Re: Re: Shared files between projects

Posted by "Bicking, David (HHoldings, IT)" <Da...@thehartford.com>.
> -----Original Message-----
> From: kmradke@rockwellcollins.com 
> [mailto:kmradke@rockwellcollins.com] 
> Sent: Monday, January 07, 2008 10:49 AM
> 
> FYI, I believe file level svn:externals are being considered for 1.6.
> 
> Kevin R.

I would love to see this added.  It would make it much easier for us to
reference compiled libraries in a single location.  Specifically, we
have several projects that produce binary libraries, and end-user
applications that use them.  With file level externals, we could
reference those individual binaries and drop them all into the
application's "lib" folder.

--
David


*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************

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


Re: Re: Shared files between projects

Posted by km...@rockwellcollins.com.
"Erik Huelsmann" <eh...@gmail.com> wrote on 01/07/2008 07:25:26 AM:
> On 1/7/08, Roth, Pierre <pi...@covidien.com> wrote:
> >
> > > Note that I personally consider the VSS style shared sources
> > > a bad idea, because it is not at all visible which projects
> > > you are modifying with your "local" modifications. If a file
> > > is in a "common" folder or comes from a library that is more
> > > explicit and doesn't bear the danger of breaking.
> > >
> > I totally agree with you if subversion projects only include source
> > files. But as SVN is also used to store documents which may be shared
> > between projects without the "breaking risk", it could be interesting 
to
> > have such a functionality. On platforms other than Windows, symlinks
> > could do the stuff but unfortunately I didn't choose mine... and 
finally
> > got Windows :-(
> 
> So what about the 'switch' functionality I proposed?

FYI, I believe file level svn:externals are being considered for 1.6.

The 'switch' concept is interesting if you can control all the clients
and automate the process with scripts.  (I think <1.4 clients required
the source of the switch to exist in the original checkout, but I think
that isn't required now...)  Pretty hard to modify graphical clients
like TortoiseSVN though.

It might be interesting to support some type of "automated" switching
in the client code, but that is bordering on ClearCase like config spec
functionality.

Kevin R.

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

Re: Re: Shared files between projects

Posted by Erik Huelsmann <eh...@gmail.com>.
On 1/7/08, Roth, Pierre <pi...@covidien.com> wrote:
>
> > Note that I personally consider the VSS style shared sources
> > a bad idea, because it is not at all visible which projects
> > you are modifying with your "local" modifications. If a file
> > is in a "common" folder or comes from a library that is more
> > explicit and doesn't bear the danger of breaking.
> >
> I totally agree with you if subversion projects only include source
> files. But as SVN is also used to store documents which may be shared
> between projects without the "breaking risk", it could be interesting to
> have such a functionality. On platforms other than Windows, symlinks
> could do the stuff but unfortunately I didn't choose mine... and finally
> got Windows :-(

So what about the 'switch' functionality I proposed?

bye,

Erik.

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

Re: Shared files between projects

Posted by Erik Huelsmann <eh...@gmail.com>.
On 1/7/08, Ulrich Eckhardt <ec...@satorlaser.com> wrote:
> On Monday 07 January 2008, Roth, Pierre wrote:
> > Is there ( current 1.4.6 release ) or is planned ( next 1.5 svn release
> > ) to have a "shared file" functionality with svn ?
> > i.e sharing files between projects (without using the svn:externals
> > property). One change to a file in one project would then be
> > automatically seen from other projects.
> >
> > Does not seem to exist on 1.4.6... But perhaps in 1.5 ?
>
> The request for such things is pretty old and has not had enough of a lobby
> yet, so it's unlikely to suddenly go in. Especially some people coming from
> SourceSafe (VSS) sometimes miss this.
>
> Alternatives:
> - svn:external (only complete dirs)
> - symlinks (not all platforms)
> - using libraries/buildscripts/whatever to distribute the files to the
> projects
> - manually updating per-project copies
> - automatically updating per-project copies

Or:
- Have both projects in the same repository
- create a third project for the shared files
- Create placeholder-files in the 2 other projects
- After checkout, 'svn switch' the placeholders to the real files in
the shared files project

After you did that, the files are integral part of your tree, meaning
that changes to them will be committed with all other changes. Updates
will be received in normal updates.

I like to posit however that most 'shared files' scenarios (especially
with source files) indicate problems with the library split. Many
times, the shared files actually belong in a separate project with its
own (stable) API.

> Note that I personally consider the VSS style shared sources a bad idea,
> because it is not at all visible which projects you are modifying with
> your "local" modifications. If a file is in a "common" folder or comes from a
> library that is more explicit and doesn't bear the danger of breaking.

Right. I can only confirm that.

bye,

Erik.

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

Re: Windows symbolic links (was: Re: Shared files between projects)

Posted by Kenneth Porter <sh...@sewingwitch.com>.
On Monday, January 07, 2008 11:14 AM -0500 Andy Levy <an...@gmail.com> 
wrote:

>> Windows has something like a symlink, but I don't think Subversion has
>> the ability to use it. Perhaps open a feature request for it.
>>
>> <http://en.wikipedia.org/wiki/NTFS_symbolic_link>
>
> The more desirable option as it is most like UNIX symlinks. But leaves
> non-Vista/Server2K8 users out in the cold.
>
>> <http://en.wikipedia.org/wiki/NTFS_junction_point>
>
> Is fraught with warnings, odd behaviors & "not safe for..."

From the information in the wiki article, it appears that the risks involve 
the awareness of the various shells (both GUI and command line), and not 
the underlying junction point. The question is whether a given operation 
operates on the JP or the object it points to. Unix users have used 
symlinks for a long time and so are mostly aware of which tools affect them 
and how. If you use a JP in Windows, you need to have the same awareness.

To me, a JP looks more like a loop mount in Linux.

It's not clear why MS chose to make the Vista symbolic link accessible only 
to Administrators.

It looks like JP's only work for directories, not files.

From <http://en.wikipedia.org/wiki/NTFS>

> Symbolic links were introduced in Windows Vista.[22] Symbolic links (or
> Soft links) are resolved on the client side. So when a symbolic link is
> shared, the target is subject to the access restrictions on the client,
> and not the server.

<http://msdn2.microsoft.com/en-us/library/aa365680.aspx>

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

Re: Windows symbolic links (was: Re: Shared files between projects)

Posted by Andy Levy <an...@gmail.com>.
On Jan 7, 2008 11:06 AM, Kenneth Porter <sh...@sewingwitch.com> wrote:
> --On Monday, January 07, 2008 12:23 PM +0000 "Roth, Pierre"
> <pi...@covidien.com> wrote:
>
> > On platforms other than Windows, symlinks
> > could do the stuff but unfortunately I didn't choose mine... and finally
> > got Windows :-(
>
> Windows has something like a symlink, but I don't think Subversion has the
> ability to use it. Perhaps open a feature request for it.
>
> <http://en.wikipedia.org/wiki/NTFS_symbolic_link>

The more desirable option as it is most like UNIX symlinks. But leaves
non-Vista/Server2K8 users out in the cold.

> <http://en.wikipedia.org/wiki/NTFS_junction_point>

Is fraught with warnings, odd behaviors & "not safe for..."

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

Windows symbolic links (was: Re: Shared files between projects)

Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Monday, January 07, 2008 12:23 PM +0000 "Roth, Pierre" 
<pi...@covidien.com> wrote:

> On platforms other than Windows, symlinks
> could do the stuff but unfortunately I didn't choose mine... and finally
> got Windows :-(

Windows has something like a symlink, but I don't think Subversion has the 
ability to use it. Perhaps open a feature request for it.

<http://en.wikipedia.org/wiki/NTFS_symbolic_link>
<http://en.wikipedia.org/wiki/NTFS_junction_point>


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

RE: Re: Shared files between projects

Posted by "Roth, Pierre" <pi...@covidien.com>.
 
> Note that I personally consider the VSS style shared sources 
> a bad idea, because it is not at all visible which projects 
> you are modifying with your "local" modifications. If a file 
> is in a "common" folder or comes from a library that is more 
> explicit and doesn't bear the danger of breaking.
> 
I totally agree with you if subversion projects only include source
files. But as SVN is also used to store documents which may be shared
between projects without the "breaking risk", it could be interesting to
have such a functionality. On platforms other than Windows, symlinks
could do the stuff but unfortunately I didn't choose mine... and finally
got Windows :-(

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


Re: Shared files between projects

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Monday 07 January 2008, Roth, Pierre wrote:
> Is there ( current 1.4.6 release ) or is planned ( next 1.5 svn release
> ) to have a "shared file" functionality with svn ?
> i.e sharing files between projects (without using the svn:externals
> property). One change to a file in one project would then be
> automatically seen from other projects.
>
> Does not seem to exist on 1.4.6... But perhaps in 1.5 ?

The request for such things is pretty old and has not had enough of a lobby 
yet, so it's unlikely to suddenly go in. Especially some people coming from 
SourceSafe (VSS) sometimes miss this.

Alternatives:
- svn:external (only complete dirs)
- symlinks (not all platforms)
- using libraries/buildscripts/whatever to distribute the files to the 
projects
- manually updating per-project copies
- automatically updating per-project copies

Note that I personally consider the VSS style shared sources a bad idea, 
because it is not at all visible which projects you are modifying with 
your "local" modifications. If a file is in a "common" folder or comes from a 
library that is more explicit and doesn't bear the danger of breaking.

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932

**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.

**************************************************************************************

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


RE: Shared files between projects

Posted by "Roth, Pierre" <pi...@covidien.com>.
> 
> Roth, Pierre wrote:
> > Hi,
> >
> > Is there ( current 1.4.6 release ) or is planned ( next 1.5 svn 
> > release
> > ) to have a "shared file" functionality with svn ?
> > i.e sharing files between projects (without using the svn:externals 
> > property). One change to a file in one project would then be 
> > automatically seen from other projects.
> >
> > Does not seem to exist on 1.4.6... But perhaps in 1.5 ?
> >
> >   
> I use the following approach for maintaining shared files of my team's
> projects: each file in the repos has a property that contains 
> a list of paths to this same file in the other projects. A 
> pre-commit script uses this property to propagate changes 
> made in a file in one project to the other projects. The 
> script also automatically changes the property if a file is 
> being copied between projects, renamed or deleted. With some 
> carefulness (such as avoiding concurrent changes in multiple 
> projects and avoiding using that property in working copies), 
> this seems to work fine. I've been using this scheme for a 
> couple of months now and everything has been going pretty 
> smooth. The only issue was a bug fixed in 1.4.6 which caused 
> the property updates to fail in some circumstances.
> 
> Anyway, I'd love to have such a feature in the Subversion too :)
> 
> Regarding,
> Dmitry
> 
> 

Fine ! Is your code available ?

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


Re: Shared files between projects

Posted by Dmitry Konyshev <dm...@gmail.com>.
Roth, Pierre wrote:
> Hi,
>
> Is there ( current 1.4.6 release ) or is planned ( next 1.5 svn release
> ) to have a "shared file" functionality with svn ?
> i.e sharing files between projects (without using the svn:externals
> property). One change to a file in one project would then be
> automatically seen from other projects.
>
> Does not seem to exist on 1.4.6... But perhaps in 1.5 ?
>
>   
I use the following approach for maintaining shared files of my team's 
projects: each file in the repos has a property that contains a list of 
paths to this same file in the other projects. A pre-commit script uses 
this property to propagate changes made in a file in one project to the 
other projects. The script also automatically changes the property if a 
file is being copied between projects, renamed or deleted. With some 
carefulness (such as avoiding concurrent changes in multiple projects 
and avoiding using that property in working copies), this seems to work 
fine. I've been using this scheme for a couple of months now and 
everything has been going pretty smooth. The only issue was a bug fixed 
in 1.4.6 which caused the property updates to fail in some circumstances.

Anyway, I'd love to have such a feature in the Subversion too :)

Regarding,
Dmitry

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