svn fetch multiple directories

Ryan Schmidt ryandesign at macports.org
Mon Oct 13 14:10:20 PDT 2014


On Oct 12, 2014, at 6:30 PM, Mark Brethen wrote:

> On Oct 12, 2014, at 4:23 PM, Mark Brethen wrote:
> 
>> I'm breaking up an svn into different subports. It would save download time if I can checkout only the directories needed from the repository for each subport. Can you give multiple URLs for 'svn.url'? Similar to:
>> 
>> $ svn checkout file:///tmp/repos/test  file:///tmp/repos/quiz working-copies
>> 
>> which checks out 2 different directories, but places both into a directory called working-copies.
>> 
>> This isn't covered in the macports documentation.
> 
> Although svn allows checking out with more than one URL, apparently port does not:
> 
> --->  Fetching distfiles for reduce-common
> Error: org.macports.fetch for port reduce-common returned: Subversion URL cannot contain whitespace
> 
> Any one know why? Is there a work around I can use?

"Why" is:

* because all fetch phases that fetch from a version control system do so via a single URL
* I was not aware that you could fetch from multiple URLs in a single "svn checkout" command
* many ports were abusing svn.url to include arbitrary commands; I wanted to put an end to that practice
* changing this would probably make the desired feature of cacheability -- https://trac.macports.org/ticket/16373 -- difficult to implement, so I would not want to change this now.

Why do you need to fetch from multiple URLs?


On Oct 12, 2014, at 9:24 PM, Mark Brethen wrote:

> Or, how about:
> 
> fetch {
> svn checkout file:///tmp/repos/test  file:///tmp/repos/quiz ${worksrcpath}
> }

There is no Tcl or MacPorts command called "svn", so you must mean:

fetch {
    system -W ${workpath} "svn co file:///tmp/repos/test  file:///tmp/repos/quiz"
}

However that would override any caching support we might eventually add to MacPorts, so I would not do that.




More information about the macports-dev mailing list