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

moved externals are not reported as externals by status

From: Dmitry Pavlenko <pavlenko_at_tmatesoft.com>
Date: Fri, 18 May 2012 15:51:22 +0200

Hello all,

Hello all. I save a directory with svn:externals set, external is checked out. "svn status -v"
reports it as 'X' for both WC 1.6 and WC 1.7. When I move the directory with svn:externals property
into another directory: for SVN 1.6 case external is still reported as 'X', but in the case of
SVN1.7 it is reported as unversioned.

I tried to investiage the problem.

svn_wc__internal_walk_status calls svn_wc__db_externals_defined_below to fill
'wb.externals' map.

svn_wc__db_externals_defined_below performs just a simple SQL request to EXTERNALS table without
considering local moves.

Later send_unversioned_item just performs a lookup of a moved path
(directory2/directory1/external) in this map and of course doesn't find anything.

Steps to reproduce:

/tmp$ svnadmin create test
/tmp$ svn co file:///tmp/test test-co
Checked out revision 0.
/tmp$ cd test-co
/tmp/test-co$ svn mkdir directory1 directory2 directory3
A directory1
A directory2
A directory3
/tmp/test-co$ svn propset svn:externals 'file:///tmp/test/directory3 external' directory1
property 'svn:externals' set on 'directory1'
/tmp/test-co$ svn commit -m Initial
Adding directory1
Adding directory2
Adding directory3

Committed revision 1.
/tmp/test-co$ svn update
Updating '.':

Fetching external item into 'directory1/external':
External at revision 1.

At revision 1.
/tmp/test-co$ svn status -v
                 1 1 dmit10 .
                 1 1 dmit10 directory1
X directory1/external
                 1 1 dmit10 directory2
                 1 1 dmit10 directory3
                                                                                                                                                                                                           
Performing status on external item at 'directory1/external':
                 1 1 dmit10 /tmp/test-co/directory1/external
/tmp/test-co$ svn mv directory1 directory2/directory1
A directory2/directory1
D directory1
/tmp/test-co$ svn status -v
                 1 1 dmit10 .
D 1 1 dmit10 directory1
                 1 1 dmit10 directory2
A + - 1 dmit10 directory2/directory1
? directory2/directory1/external
                 1 1 dmit10 directory3
                                                                                                                                                                                                           
Performing status on external item at 'directory2/directory1/external':
                 1 1 dmit10 /tmp/test-co/directory2/directory1/external
Received on 2012-05-18 15:52:57 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.