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

RE: svn:externals set to tag

From: Jordan, Tom <Tom.Jordan_at_camtronics.com>
Date: 2003-09-11 21:17:39 CEST

After reading this discussion on svn:externals, I have a couple of
more questions that I am hoping you can answer.

Consider the following scenario:

svnadmin create projectA
svnadmin create projectB
svn mkdir file:///temp/projectA/trunk file:///temp/projectB/tags -m "projA
trunk and tags"
svn mkdir file:///temp/projectB/trunk file:///temp/projectB/tags -m "projB
trunk and tags"
svn co file:///temp/projectA/trunk wcA
svn co file:///temp/projectB/trunk wcB

cd wcB
echo foobar > foo.txt
svn add foo.txt
svn ci -m "add foo"
svn cp file:///temp/projectB/trunk file:///temp/projectB/tags/1 -m "rev 1"

echo snafu > snafu.txt
svn add snafu.txt
svn ci -m "add snafu"
svn cp file:///temp/projectB/trunk file:///temp/projectB/tags/2 -m "rev 2"

cd ../wcA
svn mkdir import
svn ps svn:externals "projectB file:///temp/projectB/tags/1" import
svn ci -m "import projB rev 1"
svn up
svn cp file:///temp/projectA/trunk file:///temp/projectA/tags/1 -m "rev 1"

cd import/projectB
echo backlash > backlash.txt
svn add backlash.txt
svn ci -m "backlash
cd ../..
svn up
note: leaves backlash.txt in place.
svn cp file:///temp/projectA/trunk file:///temp/projectA/tags/2 -m "rev 2"

cd ..
svn co file:///temp/projectA/tags/1 wcA-1
svn co file:///temp/projectB/tags/1 wcB-1
svn co file:///temp/projectA/tags/2 wcA-2
note: all three retrieve backlash.txt

I know that there basically is no difference between
tags and branches in Subversion. However,
if I tag a release on a project, I want to be able
to gaurentee that I can retrieve that release later
down the road. How can I force a static tag without
relying on developer discipline?

This situation is compounded when you have a repositoryRoot
that has one repo for common institutional libraries and
one repo per product line. Each product line imports
the common libraries through svn:externals. This works great
except when a new or old developer either forgets that they
have external imports and modify files from the external
repo. Now the external's repo's tags are invalid across the
board.

Is there a way to have a compound project like this that
would allow me to statically tag across imported externals?

Is there a way to "freeze" a tag and disallow further
check-ins on that branch?

How can I use the same tag-id across repos?
or how can I detect tag-id conflict across repos?

Thanks,
-- Tom.

> -----Original Message-----
> From: Daniel Schlyder [mailto:daniel@dascdev.net]
> Sent: Thursday, September 11, 2003 10:09 AM
> To: Subversion User ML
> Subject: Re: svn:externals set to tag
>
>
> [11.09.2003 12:10:51] Michael Wood:
> > Do you mean this?
>
> > projB: svn cp trunk tags/tag1 (rev=15)
>
> > projA: svn ps svn:externals "projB
> file:///.../projB/tags/tag1" trunk
>
> > projB: do some work on
> trunk. (rev=23)
> > projB: svn cp trunk tags/tag2 (rev=24)
>
> > projA: svn up (rev of external = 24)
> > projA: svn ps svn:externals "projB
> file:///.../projB/tags/tag2" trunk
> > projA: svn up (Nothing
> updated since the rev hasn't changed.)
>
> Yes, exactly!
>
> > I'm not sure svn:externals is designed so that you can update the
> > property to another tag. Instead, you could just take note of the
> > revision tag1 is created and do this:
>
> > projA: svn ps svn:externals "projB -r 15 file:///.../projB/trunk"
> > trunk [...]
> > projA: svn ps svn:externals "projB -r 24 file:///.../projB/trunk"
> > trunk
>
> > But I've never used svn:externals, so I could be wrong :)
>
> > BTW, the "foo/bar -r 1234 http://example.com/repos/zag" syntax for
> > svn:externals doesn't seem to be mentioned in the book. It
> is in the
> > output of "svn help propset" though.
>
> Ok, many thanks! I guess this should work nicely for me since
> I only create tags from trunk.
>
> Thanks again,
> Daniel Schlyder
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 11 21:22:08 2003

This is an archived mail posted to the Subversion Users mailing list.

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