You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Kueng <to...@gmail.com> on 2015/02/16 20:01:19 UTC
pin externals when creating a copy from specific revision
Hi,
I'm still doing some testing with the new --pin-externals feature, and I
found a situation which I'm not sure should be handled that way:
imagine the repo is at r100. Now if one does a
svn copy http://server/trunk http://server/branches/b1 -r50 --pin-externals
then all externals get pinned at r100. But shouldn't in-repo externals
get pinned to r50 instead? At least in this kind of copy, I think those
externals should get pinned to r50?
Also, the svn_client_copy6 API misses the SVN_DEPRECATED macro.
Stefan
Re: pin externals when creating a copy from specific revision
Posted by Branko Čibej <br...@wandisco.com>.
On 16.02.2015 20:47, Stefan Kueng wrote:
>
>
> On 16.02.2015 20:39, Stefan Sperling wrote:
>> On Mon, Feb 16, 2015 at 08:01:19PM +0100, Stefan Kueng wrote:
>>> Hi,
>>>
>>> I'm still doing some testing with the new --pin-externals feature,
>>> and I
>>> found a situation which I'm not sure should be handled that way:
>>>
>>> imagine the repo is at r100. Now if one does a
>>> svn copy http://server/trunk http://server/branches/b1 -r50
>>> --pin-externals
>>>
>>> then all externals get pinned at r100. But shouldn't in-repo
>>> externals get
>>> pinned to r50 instead? At least in this kind of copy, I think those
>>> externals should get pinned to r50?
>>
>> In general, externals point at different repositories. So your
>> expectation
>> that any of the revision numbers involved in the copy process have
>> anything
>> to do with pinning is misguided. An intra-repository external (and
>> especially
>> a configuration where all externals come from the same repository) is
>> a special
>> case where I don't think it is wise to make pinning behave any
>> differently.
>
> I don't think that intra-repository externals are really that special.
> A lot of our users, especially those in big corporations use those
> extensively - they often have one big repository with all their
> projects as subfolders.
> And for all those setups, it would really make sense to pin those
> externals to the same revision the copy was made from.
AFAIK, 'svn update -rX' will update externals to HEAD, not to revision
X. Even if they're in-repos externals. So making 'svn copy
--pin-externals' do the same makes sense.
Using externals to track dependencies is always a tricky proposition;
typically, you should point the external to a tag or pin it with a peg
revision, otherwise you don't have any control over which version of the
dependency you're using. And Subversion is not a dependency tracker.
FWIW, one can always do a WC->REPO tag; that'll pin the externals to
their current revisions in the working copy.
-- Brane
Re: pin externals when creating a copy from specific revision
Posted by Julian Foad <ju...@btopenworld.com>.
Stefan Kueng wrote:
> On 16.02.2015 20:39, Stefan Sperling wrote:
>> In general, externals point at different repositories. [...]
>> An intra-repository external (and especially
>> a configuration where all externals come from the same repository) is a special
>> case where I don't think it is wise to make pinning behave any differently.
>
> I don't think that intra-repository externals are really that special. [...]
Just to make sure the terminology is clear: the phrase "special case" has a specific meaning, and is in contrast to "general case". The general case is that externals point to <some URL>. When <some URL> equals <this repository's URL> that's called a special case, meaning it's a subset of all the possibilities. It does not imply the case is unusual.
- Julian
Re: pin externals when creating a copy from specific revision
Posted by Stefan Kueng <to...@gmail.com>.
On 16.02.2015 20:39, Stefan Sperling wrote:
> On Mon, Feb 16, 2015 at 08:01:19PM +0100, Stefan Kueng wrote:
>> Hi,
>>
>> I'm still doing some testing with the new --pin-externals feature, and I
>> found a situation which I'm not sure should be handled that way:
>>
>> imagine the repo is at r100. Now if one does a
>> svn copy http://server/trunk http://server/branches/b1 -r50 --pin-externals
>>
>> then all externals get pinned at r100. But shouldn't in-repo externals get
>> pinned to r50 instead? At least in this kind of copy, I think those
>> externals should get pinned to r50?
>
> In general, externals point at different repositories. So your expectation
> that any of the revision numbers involved in the copy process have anything
> to do with pinning is misguided. An intra-repository external (and especially
> a configuration where all externals come from the same repository) is a special
> case where I don't think it is wise to make pinning behave any differently.
I don't think that intra-repository externals are really that special. A
lot of our users, especially those in big corporations use those
extensively - they often have one big repository with all their projects
as subfolders.
And for all those setups, it would really make sense to pin those
externals to the same revision the copy was made from.
Stefan
Re: pin externals when creating a copy from specific revision
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Feb 16, 2015 at 08:01:19PM +0100, Stefan Kueng wrote:
> Hi,
>
> I'm still doing some testing with the new --pin-externals feature, and I
> found a situation which I'm not sure should be handled that way:
>
> imagine the repo is at r100. Now if one does a
> svn copy http://server/trunk http://server/branches/b1 -r50 --pin-externals
>
> then all externals get pinned at r100. But shouldn't in-repo externals get
> pinned to r50 instead? At least in this kind of copy, I think those
> externals should get pinned to r50?
In general, externals point at different repositories. So your expectation
that any of the revision numbers involved in the copy process have anything
to do with pinning is misguided. An intra-repository external (and especially
a configuration where all externals come from the same repository) is a special
case where I don't think it is wise to make pinning behave any differently.
> Also, the svn_client_copy6 API misses the SVN_DEPRECATED macro.
Thanks! I see Bert fixed that.
Re: pin externals when creating a copy from specific revision
Posted by Julian Foad <ju...@btopenworld.com>.
Lorenz wrote:
> Stefan Kueng wrote:
>> I'm still doing some testing with the new --pin-externals feature, and I
>> found a situation which I'm not sure should be handled that way:
>>
>> imagine the repo is at r100. Now if one does a
>> svn copy http://server/trunk http://server/branches/b1 -r50 --pin-externals
>>
>> then all externals get pinned at r100. But shouldn't in-repo externals
>> get pinned to r50 instead? At least in this kind of copy, I think those
>> externals should get pinned to r50?
>
> just thinking out loud: would making --pin-externals require/allow a
> revision parameter be an alternative?
Lorenz: No, because in general the externals can point to different repositories, and the revision numbers in different repositories are not synchronized.
- Julian
Re: pin externals when creating a copy from specific revision
Posted by Lorenz <lo...@yahoo.com>.
Stefan Kueng wrote:
>I'm still doing some testing with the new --pin-externals feature, and I
>found a situation which I'm not sure should be handled that way:
>
>imagine the repo is at r100. Now if one does a
>svn copy http://server/trunk http://server/branches/b1 -r50 --pin-externals
>
>then all externals get pinned at r100. But shouldn't in-repo externals
>get pinned to r50 instead? At least in this kind of copy, I think those
>externals should get pinned to r50?
just thinking out loud: would making --pin-externals require/allow a
revision parameter be an alternative?
--
Lorenz
Re: pin externals when creating a copy from specific revision
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Feb 16, 2015 at 08:33:26PM +0100, Stefan Kueng wrote:
> My usual use case for creating a copy not from HEAD but an earlier revision
> is when I forgot to create a tag, and there have already been other commits
> done after making the release.
> So in that situation, it would be wrong to pin the externals (those pointing
> to the same repository) to HEAD but those should be pinned to the revision
> I'm creating the tag from.
> Checking out that tag then would work as I expect - if the externals were
> pinned to HEAD, the project might not compile.
I would argue that these are special circumstances where you can edit
svn:externals props in the copy after creating it, rather than expecting
this use case to apply to everyone.
It's best to have pinning behave consistently across all externals.
Re: pin externals when creating a copy from specific revision
Posted by Stefan Kueng <to...@gmail.com>.
On 16.02.2015 20:22, Bert Huijben wrote:
>
>
>> -----Original Message----- From: Stefan Kueng
>> [mailto:tortoisesvn@gmail.com] Sent: maandag 16 februari 2015
>> 20:01 To: Subversion Development Subject: pin externals when
>> creating a copy from specific revision
>>
>> Hi,
>>
>> I'm still doing some testing with the new --pin-externals feature,
>> and I found a situation which I'm not sure should be handled that
>> way:
>>
>> imagine the repo is at r100. Now if one does a svn copy
>> http://server/trunk http://server/branches/b1 -r50 --pin-externals
>>
>> then all externals get pinned at r100. But shouldn't in-repo
>> externals get pinned to r50 instead? At least in this kind of copy,
>> I think those externals should get pinned to r50?
>
> I can see your reasoning but this is the same behavior as an svn
> checkout of the same revision, so changing it will introduce a
> new/different issue... And this is the same thing as we would do as
> to externals pointing to other repositories.
I'm curious: what kind of other issues would this cause?
Or is there an issue of not recognizing externals of the same repository
in all situations?
My usual use case for creating a copy not from HEAD but an earlier
revision is when I forgot to create a tag, and there have already been
other commits done after making the release.
So in that situation, it would be wrong to pin the externals (those
pointing to the same repository) to HEAD but those should be pinned to
the revision I'm creating the tag from.
Checking out that tag then would work as I expect - if the externals
were pinned to HEAD, the project might not compile.
Stefan
RE: pin externals when creating a copy from specific revision
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Stefan Kueng [mailto:tortoisesvn@gmail.com]
> Sent: maandag 16 februari 2015 20:01
> To: Subversion Development
> Subject: pin externals when creating a copy from specific revision
>
> Hi,
>
> I'm still doing some testing with the new --pin-externals feature, and I
> found a situation which I'm not sure should be handled that way:
>
> imagine the repo is at r100. Now if one does a
> svn copy http://server/trunk http://server/branches/b1 -r50 --pin-externals
>
> then all externals get pinned at r100. But shouldn't in-repo externals
> get pinned to r50 instead? At least in this kind of copy, I think those
> externals should get pinned to r50?
I can see your reasoning but this is the same behavior as an svn checkout of the same revision, so changing it will introduce a new/different issue... And this is the same thing as we would do as to externals pointing to other repositories.
> Also, the svn_client_copy6 API misses the SVN_DEPRECATED macro.
Thanks... added that in r1660183.
Bert