How to commit to svn repository with externals. What if external points to TAG in repo?By neokrates, written on October 19, 2010
My customer has a big main code line and one external reference. I branched from the HEAD of TRUNK and my working copy was pointing to the branch. Really, I swear
Now I made some changes and wanted to commit, and to my surprise I got “you don’t supposed to commit on tag” kind of message. I guess, a friendly SVN trigger left by someone prudent. Why and what should I do?
I am on the branch:
> svn info Path: . URL: https://my.host/svn/main/branches/MY_CURRENT_BRANCH ...
svn propget -R svn:externals . you can check the externals:
> svn propget -R svn:externals . . - res https://my.host/svn/intern/tags/MY_COOL_TAG
So, it appears that my
res directory can't be committed now! It points to TAG.
svn switch is actually a form of update, so your local changes are never lost.
Important is also that after switch there is no guarantee that you are in sync with new remote, you just point there, but you still may need to synchronize.
What to do:
Make sure external points to the BRANCH or HEAD
Now, I just do the switch on
res directory. But wait, what about my changes? That is not a problem!
Remember, that switch is actually a form of update so the changes remain.
Now, I have
> svn propget -R svn:externals . . - res https://my.host/svn/intern/branches/FOR_MY_FEATURE
and I also have all my feature implemented.
Commit or reintegrate
Now you can commit all you have done to the external location. That part is trivial.
Done! Have fun!
LEARN MORE (amazon bookstore)
INCOMING SEARCH TERMS