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

Re: [vote] pin-externals branch to trunk

From: Stefan Kueng <tortoisesvn_at_gmail.com>
Date: Thu, 29 Jan 2015 19:26:01 +0100

On 29.01.2015 12:33, Stefan Sperling wrote:
> On Thu, Jan 29, 2015 at 12:14:27PM +0100, Tom Ghyselinck wrote:
>> Hi everybody,
>> I am following this feature with a lot of interest!
>> One question pops up:
>> 1. Suppose I have a branch "B" with external references to "E"
>> 2. "E" has an external reference to "F"
>> When I copy "B" to "C" with --pin-externals, then
>> 1. The external reference "E" will be pinned to e.g. "E_at_999".
>> 2. I suppose "Within" the repository/branch "E", "F" won't be pinned to
>> "F_at_888"
>> Is this correct?
>> I understand this is not what subversion wants/can do since
>> "E" may be in another repository where you don't have access to.
>> But this *does limit* the use-cases of the --pin-externals.
> Are you asking if external descriptions within repositories pointed
> to by externals will be pinned (recursively)? If so, the answer is no
> because there is no commit made to other repositories externals point to.
> The copy can only modify externals properties that are part of the tree
> being copied.
> Generally, if you rely on this kind of indirection, I think you're stretching
> the use case of this feature far beyond what it was designed for. For example,
> it was never meant to be a full-blown "dependency manager" for source code
> components even though some SVN users tend to (unwisely) use it for such
> purposes. There are other tools which were designed for this kind of thing.
> Apache Maven comes to mind, but there are others outside the Java world.

TortoiseSVN has such a feature. Of course, it doesn't work in an ideal
way. Here's what I do in TSVN:

The branch/tag dialog (the one that's shown for an 'svn copy') scans the
working copy for all external properties, and it does this recursively.
It also checks the uuid of the repository. All externals that point to
the main repository (even the recursive ones) are then shown in a list
at the bottom of the dialog. Each external item (file or folder) is also
scanned for the highest revision. That's the revision the external is
later tagged to.
The list has a checkbox for each item, so users can chose which external
they want to tag.
See here for a screenshot:

For copies made from a working copy, TSVN first modifies all external
properties locally, then creates the copy from the working copy. For
copies done directly on the repository, it first creates the copy, then
modifies each external property separately (which leads to multiple
'commits' - as I said: not ideal).

Looking at svn_client_commit6(), it has two bool values to include file
and/or dir externals in the commit. So it seems to me that it might be
possible to change externals (that reside in the same repository)

Also, the current implementation of this feature does not allow to
select externals individually to tag. Would it be a good idea to extend
this? Maybe one API that returns a list of externals and their revision
which they would be tagged to, and then svn_client_copy6 would take that
list (or a list with only those items the user wants to tag) and then
only tag those externals in that list?

This way, TSVN could make use of this new APIs and drop its own (not
ideal) code.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
Received on 2015-01-29 19:27:07 CET

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

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