RE: Switching
From: John Maher <JohnM_at_rotair.com>
Date: Thu, 22 Aug 2013 11:30:03 +0000
Thanks for your replies Andrew and Thorsten.
@Andrew there is no need for a svn copy. I do not want to copy a feature in one branch to another; I wish to keep the code isolated.
And yes I know subversion won't delete unversioned files, I appreciate the info on how subversion works. Some of it was helpful. I was hoping to hear how others may have solved the same problem. But it seems the only answer is a tedious and manual process for the simplest of enhancements.
I was hoping to find what others seem to praise, but have continually come up empty handed. I'll check stackoverflow before I give up.
Thanks anyway
-----Original Message-----
> -----Original Message-----
When removing dirs, switch will not delete local/private/unversioned files. If there is a local file in a dir tree, then all the versioned files will be removed from your workspace, but a local tree will remain with the local files still in it. That's mostly likely why you see a '?' after the switch.
Ex:
>
You shot yourself in the foot. =)
The local copy of the dir prevented switch from running the add. (Switch wasn't able to pull in the versioned copy of the dir.) Then you didn't fix the dir conflict by manually running 'svn copy' yourself to pull in the dir from branch P. When you did the resolve, you told svn that the current state of the dir is correct, and since the current state of the dir was effectively "deleted", you wound up telling svn to delete the file from branch P.
Again, when resolving tree conflicts, you need to manually copy/add/delete/mv manipulate the tree into the correct state before resolving the tree conflict.
>
You can recover the deleted versioned dirs and files via peg revisions. http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.resurrect
Right. You deleted the dir from branch P. And you deleted the local/private files/tree as well. Thus no conflict with branch E.
However, if you want to get the dir into branch E, then you should have merged from branch P to branch E (or used 'svn copy ^/branches/P/some_dir ^/branches/E/some_dir.) (But you'll need to restore the dir in branch P first via 'svn copy' and a peg revision.)
> So I copy over the
Argh. No, no, no. That creates "evil twins". What you should have done was 'svn copy svn://..../some_dir_at_1234 some_dir" to add the dir back in. When you run 'svn add' you create brand new objects with no history. Evil twins break merging.
> This is where the problem arises. Subversion deletes the files but
Svn switch won't delete your local/private files because that would be rude, where rude equals "destroying the user's files." So if you're switching, you need to manage private/local files. Maybe run 'make clean' (assuming you have a clean option) before switching? Or tweak your build script to put all build output in its own dir, instead of putting output in the versioned dirs?
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.