[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

SV: Tags & svn:externals

From: Hans-Emil Skogh <Hans-Emil.Skogh_at_tritech.se>
Date: Tue, 21 Apr 2009 15:51:56 +0200

> Several of our SVN users raised the following issue:

> They are using svn:externals a lot as a very good method of achieving code modularity & reuse.

> When creating a Tag of their project they expect to get an invariable copy of the code for posterity.

> But, if folders contain externals definitions which do not have explicit revisions, the Tag is neither

> invariable nor reproducible.

 
Hi!
 
I would suggest that you add a server side hook to your repository that denies commits of tags that has externals without an explicit revisions that are tags as well. This will be a bit of a headache for a short time in the beginning untill all your modules has been tagged without "floating" (non-explicit revision) externals, but when they have you have solved the problem.
A slightly more restrictive but (in my view better way) is simply to deny any commit what so ever with "floating" externals.
 
There's in my view really no good way around the problem except exclusively using explicit revisions for externals, and enforcing this with server side hooks.
 
If your users are generally happy to develop with "floating" externals I guess you could add some sugar along these lines:
1.) As client side post update, remove all (or some, maybe those tagged with a specific property) explicit revisions from the externals. Then update those again.
2.) When it's time to commit, run a client side pre-commit hook that checks what revision the "floating" externals has and sets those revisions as explicit external revisions.
 
I think that trying to do "deep" operations on externals will lead to confusion, headache and generally to problems. Try to keep all revisions invariable and reproducible and you'll have none of those problems.
 
Hans-Emil

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=1843763

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-04-21 15:53:23 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.