You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by C M <cm...@gmail.com> on 2013/03/26 16:05:10 UTC

Update externals - trunk -> branch

Hello,

When svn: external properties are updated on trunk, how can those updates
be propagated to developer branches that are coming off the trunk?


Is there a svn command I can run to “push” those updates? I tried "svn
update" but that didn't do the job.


Please advise.


Amad.

Re: Update externals - trunk -> branch

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Mar 26, 2013 at 01:25:36PM -0500, C M wrote:
> Hmm, I wouldn't have expect that a merge would be needed to update a
> property value. Is there another way this can be accomplished?

No, apart from editing the property on the branch manually.

> Our team is new to SVN and feeling its way around the tool.

Trust me, running a merge that merges the revision which changed the
svn:externals property is the way this is intended to be done by design.

Below is an example which assumes a /trunk folder and a /branch
folder which is a copy of /trunk, plus one working copy of each
called 'trunk' and 'branch' respectively.

We first go into the trunk working copy, and then create a new directory
in the repository called /ext. This is defined as an external so that
it appears in the trunk working copy at the path epsilon/ext.
Next, the revision which defined the external at /trunk/epsilon is
merged into the branch.

For brackground info on 'svn merge' see 'svn help merge' and
http://svnbook.red-bean.com/en/1.7/svn.branchmerge.html

$ cd trunk
$ ls
alpha    beta     epsilon/ gamma/
$ svn ps svn:externals '^/'
$ svn mkdir ^/ext -m "add external dir to repos"

Committed revision 3.
$ svn propset svn:externals '^/ext ext' epsilon
property 'svn:externals' set on 'epsilon'
$ svn up
Updating '.':

Fetching external item into 'epsilon/ext':
External at revision 3.

At revision 3.
$ svn st
 M      epsilon
X       epsilon/ext

Performing status on external item at 'epsilon/ext':
$ svn ci -m "add external to epsilon"
Sending        epsilon

Committed revision 4.
$ cd ../branch/  # go to working copy of branch
$ svn merge -c4 ^/trunk
--- Merging r4 into '.':
 U   epsilon
--- Recording mergeinfo for merge of r4 into '.':
 U   .
$ svn diff
Index: epsilon
===================================================================
--- epsilon     (revision 2)
+++ epsilon     (working copy)

Property changes on: epsilon
___________________________________________________________________
Added: svn:externals
## -0,0 +1 ##
+^/ext ext
Index: .
===================================================================
--- .   (revision 2)
+++ .   (working copy)

Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk:r4
$ svn ci -m "merge r4 from trunk"
Sending        .
Sending        epsilon

Committed revision 5.
$ svn up
Updating '.':

Fetching external item into 'epsilon/ext':
External at revision 5.

At revision 5.
$ svn st
X       epsilon/ext

Performing status on external item at 'epsilon/ext':
$

Re: Update externals - trunk -> branch

Posted by C M <cm...@gmail.com>.
Hmm, I wouldn't have expect that a merge would be needed to update a
property value. Is there another way this can be accomplished?

Our team is new to SVN and feeling its way around the tool.


On Tue, Mar 26, 2013 at 10:12 AM, Stefan Sperling <st...@elego.de> wrote:

> On Tue, Mar 26, 2013 at 10:05:10AM -0500, C M wrote:
> > Hello,
> >
> > When svn: external properties are updated on trunk, how can those updates
> > be propagated to developer branches that are coming off the trunk?
>
> By using the 'svn merge' command.
> See http://svnbook.red-bean.com/en/1.7/svn.branchmerge.html
>

Re: Update externals - trunk -> branch

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Mar 26, 2013 at 10:05:10AM -0500, C M wrote:
> Hello,
> 
> When svn: external properties are updated on trunk, how can those updates
> be propagated to developer branches that are coming off the trunk?

By using the 'svn merge' command.
See http://svnbook.red-bean.com/en/1.7/svn.branchmerge.html