简体   繁体   中英

Get all projects in SVN that have svn:externals to a certain repository

I have many projects in SubVersion that have an svn:externals reference to a Core project (let's say they have an svn:externals property pointing a local path /Components to http://svn/repos/core_components ).

Now, I want to get a list of all the projects/folders that have an svn:externals reference to that Core project. Is there an SVN command/script/tool to perform that? (I am on Windows)

If your externals definitions are scattered throughout the repository-tree - you'll have a Bad Day (tm): you have togo recursively over all nodes in each you repository, for Windows it isn't an easiest task. For recursive testing repo-tree add -R option to used command

If you have common place for all externals in repo (root /of trunk/ is good candidate), you can use

svn propget svn:externals (check only one property)

or

svn proplist -v (get all properties with values)

you'll get grepable output (or none in case of propget and missing externals)

Samples:

  • Non-recursive propget for path with externals

>svn propget svn:externals

https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib lib

  • Non-recursive verbose proplist for path with externals

>svn proplist -v

Properties on '.':

svn:externals

https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib lib

  • Recursive propget for path with externals

>svn propget svn:externals -R

tags\\1.0.1 - -r 2 https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib@2 lib

trunk - https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib lib

  • Non-recursive propget for path without externals

>svn propget svn:externals

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM