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

Re: New feature clarification (commit with externals)

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 17 Jun 2013 14:59:12 -0400

On 06/17/2013 02:35 PM, Mark Phippard wrote:
> On Mon, Jun 17, 2013 at 2:28 PM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
>> My testing seems to show that we do not appear to commit externals pulled
>> from a different repository than the primary working copy. Can someone
>> confirm this? Is there a technical reason not to do this? Obviously we
>> can't do a multi-repository atomic commit, but I could have sworn that at
>> one time this feature would sort the committables by repository, then issue
>> one commit per repository (with the opportunity to compose a log message for
>> each commit grouping). Maybe I'm just delusional?
>
> We use the feature you describe in Subclipse via JavaHL (talking about
> SVN 1.7.x). It works provided that you name all the targets on the
> commit API call, which we do from Subclipse.
>
> We are not planning to use this new --include-external feature since
> it mainly seems to imply to the implicit traversal done when only a
> top-level target(s) is named.
>
> Hopefully explicitly naming targets still works, but yes it sounds
> like this feature ought to support it too.

Right, it appears that this feature really just boils down to Subversion
adding more targets to the commit command-line on your behalf (though, in
the client API rather than in the 'svn' binary itself). I guess I was just
confused because if I manually attempt to commit from two working copies of
different repositories, I get an error that says Subversion can't do that.
But I effectively do the same via the 'svn commit --include-externals'
feature, Subversion silently fails to commit stuff from outside the main
repository:

   ### Make two Greek repositories

   $ make-greek-repos main
   $ make-greek-repos aux

   ### Checkout the "main" one.

   $ svn co file://`pwd`/main wc
   A wc/A
   A wc/A/B
   A wc/A/B/lambda
   A wc/A/B/E
   A wc/A/B/E/alpha
   A wc/A/B/E/beta
   A wc/A/B/F
   A wc/A/mu
   A wc/A/C
   A wc/A/D
   A wc/A/D/gamma
   A wc/A/D/G
   A wc/A/D/G/pi
   A wc/A/D/G/rho
   A wc/A/D/G/tau
   A wc/A/D/H
   A wc/A/D/H/chi
   A wc/A/D/H/omega
   A wc/A/D/H/psi
   A wc/iota
   Checked out revision 1.

   ### Set the externals property on the main working copy
   ### to pull in bits from the same repository and from the
   ### "aux" repository, and commit.

   $ svn pset svn:externals "^/A/D/G main-G
   ../aux/A/D/G aux-G" wc
> property 'svn:externals' set on 'wc'
   $ svn up wc
   Updating 'wc':

   Fetching external item into 'wc/main-G':
   A wc/main-G/pi
   A wc/main-G/rho
   A wc/main-G/tau
   Updated external to revision 1.

   Fetching external item into 'wc/aux-G':
   A wc/aux-G/pi
   A wc/aux-G/rho
   A wc/aux-G/tau
   Updated external to revision 1.

   At revision 1.
   $ svn ci -m "Add externals def." wc
   Sending wc

   Committed revision 2.

   ### Now make changes in the primary and both external
   ### working copies and commit with --include-externals.

   $ echo `date` >> wc/main-G/pi
   $ echo `date` >> wc/aux-G/rho
   $ echo `date` >> wc/A/D/G/tau
   $ svn st wc
   M wc/A/D/G/tau
   X wc/aux-G
   X wc/main-G

   Performing status on external item at 'wc/main-G':
   M wc/main-G/pi

   Performing status on external item at 'wc/aux-G':
   M wc/aux-G/rho
   $ svn ci -m "Commit it." wc --include-externals
   Sending wc/main-G/pi
   Sending wc/A/D/G/tau
   Transmitting file data ..
   Committed revision 3.

   ### Huh?! My "aux" changes were left uncommitted without
   ### warning.

   $ svn st wc
   X wc/aux-G
   X wc/main-G

   Performing status on external item at 'wc/main-G':

   Performing status on external item at 'wc/aux-G':
   M wc/aux-G/rho
   $

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2013-06-17 20:59:47 CEST

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.