7

Possible Duplicate:
List all svn:externals recursively?

I need to move the location of a component that is referenced by many projects with an svn:external.

How can I easily find all locations that have an svn:external to this URI?

Community
  • 1
  • 1
Andrew Bullock
  • 36,616
  • 34
  • 155
  • 231
  • 1
    See http://stackoverflow.com/questions/681833/list-all-svnexternals-recursively and http://superuser.com/questions/191864/viewing-all-subversion-externals – David d C e Freitas Jul 01 '11 at 07:29

2 Answers2

10
 svn propget svn:externals http://path/to/repos -R

lists all externals, its not filtered, suppose i could grep it if i was on a decent OS.

Andrew Bullock
  • 36,616
  • 34
  • 155
  • 231
6

I used a slight variation on the other answer (apologies for partial plagiarism)...

svn propget --xml -R svn:externals https://myserver/myrepo > results.xml

and then ran the results through an XPath using something like...

//properties/target[contains(./property,'https://myserver/myrepo/mysearchpath')]/@path

This gave me a short list containing all references.

The longest part was waiting for the propget which takes literally hours on our repository. Not sure if this can be improved.

Krayol
  • 61
  • 1
  • 3
  • 1
    The command given searches a complete repository, which is slow. Maybe it is sufficient to search the externals referenced in your working copies? Then a similar command is **much** faster: `svn propget svn:externals --xml -R * > results.xml` – SomeStupid Jan 19 '18 at 16:12
  • I agree @SomeStupid, although that only works if the working copy contains the referencing (not referenced) code. Since it was mentioned that the author had many projects referencing the external, I assumed that it was not known which projects referenced it, but a working copy search is far faster if you do know! – Krayol Feb 08 '18 at 11:28