How to commit to svn repository with externals. What if external points to TAG in repo?

By neokrates, written on October 19, 2010

howto

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 955 views
Rate it
Ad
Poll
  • Do you plan to migrate to new SCM?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

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
...

But…

By typing 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:

1

Make sure external points to the BRANCH or HEAD

In my example, res -> https://my.host/svn/intern/tags/MY_COOL_TAG.
What I can and probably want to do is to take the HEAD of https://my.host/svn/intern/trunk and branch it.

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.

2

Commit or reintegrate

Now you can commit all you have done to the external location. That part is trivial.
Done! Have fun! ;)

Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: -2 (from 2 votes)
0 votes 'YES'  2 votes 'NO'


TAGS

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


Leave a Reply