You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Phil Endecott <sp...@chezphil.org> on 2005/11/01 21:09:08 UTC
Freezing externals when tagging
Dear All,
I have an application and a library in the same repository, but with
their own trunk and tags directories, i.e.
repo
library
tags
trunk
appl
tags
trunk
The application refers to the library using svn:externals, i.e.
appl/trunk has property svn:externals set to "lib http://.../library/trunk".
I tag releases of the application using "svn cp appl/trunk
appl/tags/version123". But when I do this the externals property is not
"frozen" in any way, so someone checking out a tagged version will
continue to get the most recent version of the library. I want to avoid
that happening.
I don't normally explicitly tag the library, so I'd prefer for the
external to refer to the revision number of the library at the time that
the tag was made. I think that I need to change the svn:external
property during the copy to add "-r rev".
There are a couple of alternatives. I could tag that library at the
same time as I tag the application, and have the external refer to the
tagged library. Or I could get rid of the external when I tag and copy
the current version of the library in explicitly.
Perhaps I need a hook script to do this for me. Maybe one already
exists? (Google finds plenty of people complaining about externals, but
I don't see any solutions.)
I'm sure I'm not the first one to want to do this. Does anyone have any
suggestions?
Cheers,
--Phil.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Freezing externals when tagging
Posted by Kalin KOZHUHAROV <ka...@thinrope.net>.
Phil Endecott wrote:
> Dear All,
>
> I have an application and a library in the same repository, but with
> their own trunk and tags directories, i.e.
>
> repo
> library
> tags
> trunk
> appl
> tags
> trunk
>
> The application refers to the library using svn:externals, i.e.
> appl/trunk has property svn:externals set to "lib
> http://.../library/trunk".
>
> I tag releases of the application using "svn cp appl/trunk
> appl/tags/version123". But when I do this the externals property is not
> "frozen" in any way, so someone checking out a tagged version will
> continue to get the most recent version of the library. I want to avoid
> that happening.
>
> I don't normally explicitly tag the library, so I'd prefer for the
> external to refer to the revision number of the library at the time that
> the tag was made. I think that I need to change the svn:external
> property during the copy to add "-r rev".
What is wrong difficult about changing to a fixed revision of an external?
It is recomended in the book:
http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html
> There are a couple of alternatives. I could tag that library at the
> same time as I tag the application, and have the external refer to the
> tagged library.
That is an option in your specific case only (you have control over your external).
> Or I could get rid of the external when I tag and copy
> the current version of the library in explicitly.
disk space, persistency, too much manual labor.
> Perhaps I need a hook script to do this for me. Maybe one already
> exists? (Google finds plenty of people complaining about externals, but
> I don't see any solutions.)
Never heard of, probably nobody has produced one, and it is not easy, AFAIK.
> I'm sure I'm not the first one to want to do this. Does anyone have any
> suggestions?
A client side wrapper (no, we don't have client side hook scripts) that fixes all externals to their
current HEAD recursively. Or just some, but that will be PITA as a CLI.
Kalin.
--
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Freezing externals when tagging
Posted by Phil Endecott <sp...@chezphil.org>.
Ryan Schmidt wrote:
> On Nov 1, 2005, at 22:09, Phil Endecott wrote:
>> I tag releases of the application using "svn cp appl/trunk appl/
>> tags/version123". But when I do this the externals property is not
>> "frozen" in any way, so someone checking out a tagged version will
>> continue to get the most recent version of the library. I want to
>> avoid that happening.
>
> Look into the svncopy.pl script which is in the contrib/client-side
> directory of the Subversion source distribution.
Thanks Ryan, that does exactly what I need.
(Here's an extract from its README, in case anyone else needs something
like this:)
This Perl script copies one Subversion location or set of locations to
another, in the same way as svn copy.
svncopy --pin-externals (or svncopy --tag) will update any unversioned
svn:externals in the destination tree to contain the current version of
the directory listed in the svn:externals definition. This effectively
pins the reference to the current version, and is the behaviour you want
for tagging.
--Phil.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Freezing externals when tagging
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 1, 2005, at 22:09, Phil Endecott wrote:
> I have an application and a library in the same repository, but
> with their own trunk and tags directories, i.e.
>
> repo
> library
> tags
> trunk
> appl
> tags
> trunk
>
> The application refers to the library using svn:externals, i.e.
> appl/trunk has property svn:externals set to "lib http://.../
> library/trunk".
>
> I tag releases of the application using "svn cp appl/trunk appl/
> tags/version123". But when I do this the externals property is not
> "frozen" in any way, so someone checking out a tagged version will
> continue to get the most recent version of the library. I want to
> avoid that happening.
>
> I don't normally explicitly tag the library, so I'd prefer for the
> external to refer to the revision number of the library at the time
> that the tag was made. I think that I need to change the
> svn:external property during the copy to add "-r rev".
>
> There are a couple of alternatives. I could tag that library at
> the same time as I tag the application, and have the external refer
> to the tagged library. Or I could get rid of the external when I
> tag and copy the current version of the library in explicitly.
>
> Perhaps I need a hook script to do this for me. Maybe one already
> exists? (Google finds plenty of people complaining about
> externals, but I don't see any solutions.)
Look into the svncopy.pl script which is in the contrib/client-side
directory of the Subversion source distribution.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org