I'm fairly new to Subversion and recently learned how to automatically import files which belong to other repositories using svn:externals
. And now when I commit the trunk folder and create a tag to take a snapshot of the project, the files/folders defined as externals won't be added to the tag folder.
For example, I have this folder structure
Z:\repos\repoA
Z:\repos\repoB
Z:\Projects\workB
I have set svn:externals
on Z:\Projects\workB
to file:///Z:/repos/repoA/trunk/lib trunk/lib
so that repoA
's lib folder is automatically added to the current working directory, Z:\Projects\workB\trunk
. And actually when I perform SVN Update
, the lib folder is created under the trunk folder.
After editing some files and performing SVN Commit...
on Z:\Projects\workB\trunk
, I selected TortoiseSVN -> Branch/Tag
from the context menu. In the To Path
field, typed tags/1.0.1
and pressed OK. The 1.0.1 tag was successfully created.
After I performed SVN Update
on Z:\Projects\workB\tags
, a folder named 1.0.1 appeared but without external files.
Is this normal? I expected the imported files also would be there since they are in the trunk folder of the working directory.
I created two public repositories at Assembla for anyone to test this out.
- https://www.assembla.com/code/subversion-trouble-shooting/subversion/nodes
- https://www.assembla.com/code/subversion-troubleshoot-b/subversion/nodes
The second repository has the externals definition which pulls down the lib
folder from the first repository. When I create a tag of the current trunk files from the second repository, it does not add the external files to the tag folder. Also when I check out the tag folder, it won't add the external files to the local working copy.
What language/tooling are you using?
- Currently I'm coding in PHP. I see your point that it gonna be a trouble if importing files get changed. In my case, they are all my files that I've created including the library files. And actually I need to update the second project if the first project gets updated. So in this particular case,svn:externals
seems to be the perfect solution. Thanks for your insight. – Cant