I have been reading up on Vendor Branches with subversion. I'm not very comfortable with the subversion command line and I have been using TortoiseSVN and Subclipse as SVN clients on my Windows 7 box.
In the Vendor Branches documentation for subversion, they discuss doing a "foreign repository copy", but I have not been able to find how to do this with TortoiseSVN. When I have searched the internet for how to do this with TortoiseSVN, I found articles suggesting using svn:externals instead. The documentation for Vendor Branches does not say to use svn:externals and instead says to use a foreign repository copy.
Does anyone know how I can do such a copy with TortoiseSVN? If it is not possible, would svn:externals give me the same result?
EDIT:
Here is my workflow:
- I created a new root-level folder in my repository called
vendor. This is a sibling oftrunk. - I checked out
myrepo/vendorto a new working copy. - I attempted to merge
two different treesusing TortoiseSVN frommyvendorrepo/trunktomyrepo/vendor. This returned an error telling me thatmyvendorrepo/trunkmust be in the same repository asmyrepo/vendor.
The Vendor Branch documentation specifically talks about a foreign repository copy, but it does not seem to be possible with TortoiseSVN.
svn help merge) - this type of merge not used in Vendor Branching, used by different way and for different goals:svn merge URL1 URL2will merge into WC of URL3 independent parallel changes from URL1+URL2"Foreign Copy" and Externals Vendor Branching in Sample
Let's imagine:
VENDOR/PATH/TO/LIBRARYMY/VENDORS/VENDOR/LIBRARY(additional intermediate /VENDORS node is workpiece for the future, when more than 1 vendor may appear)MY/trunk"Foreign Copy"-style
VENDORrepository withsvnadmin dumpand transmit dump to you, after it filter only/PATH/TO/LIBRARYnode withsvndumpfiltersvnrdump URL, which have some benefits: you can dump any remote repository, for which you have read-access, you can dump only part of repository (and eliminate svndumpfilter headache) -svnrdump dump VENDOR/PATH/TO/LIBRARY > dumpfileMYrepository:svnadmin load /PATH/TO/MY < dumpfilewith some additions:--ignore-uuidoption (in case of not-emptyMY) not needed, but may be used for safety/PATH/TO/LIBRARYto/VENDORS/VENDOR/LIBRARYadditional option--parent-dir /VENDORS/VENDOR/is a must (TBT!!! I write parent spec from memory)After these operations you'll have node in your local repository, which is exact copy of remote node, but not related toremote by any way: you have to monitor remote changes and sync with your copy by hand (
svn up VENDOR/PATH/TO/LIBRARYin separate WC, copy changes to your WC, commit changes)Externals-style
/VENDORS/VENDOR/inMYrepository (svn mkdir --parents /VENDORS/VENDOR)For both styles integration of upstream to your code will be just periodical merge /VENDORS/VENDOR/LIBRARY to trunk
PS: for externals-syle first creating initial snapshot in trunk (in case of empty trunk) and first merge to trunk may be troublesome and not obvious. AFAICR, you will not be able to merge /VENDORS/VENDOR/LIBRARY to empty trunk (and
svn copyalso ): you'll get (can't recall text) error and no merge|copy at all. Can't reference to The Right Way, but I just copy filesin Working Copy from vendor branch to trunk and commit trunk in order to have BASE and in this case in first merge (and only first) of LIBRARY to trunk in order to merge unrelated (for Subversion) nodes add--ignore-ancestryoption: later trunk and LIBRARY are already related