开发者

Parallel path in SVN overwriting each other's files

开发者 https://www.devze.com 2023-01-31 17:34 出处:网络
I have two paths, let\'s say: root\\folder1 root\\folder2 While the folder names are different, both contain files with the same names, just some of their contents differ. I have all the paths and a

I have two paths, let's say:

root\folder1 root\folder2

While the folder names are different, both contain files with the same names, just some of their contents differ. I have all the paths and all their files added to SVN. Now, I make a change to root\folder1\fileA and commit it. If I try to make a change to root\folder2\fileA, I get an error citing I need to update first. When I do update, my local copy is overwritte开发者_开发百科n with the changes I just made to fileA under root\folder1. And this works vice versa.

I don't know why this is happening. I even deleted root\folder2 and recreated it and re-added it to SVN. But the same thing is still happening...


It sounds like folder1 and folder2 are two working copies of the same repository directory. If you check svn info (or the equivalent in tortoisesvn) for folder1 and folder2, that should give a clue as to what's going on.


This is what happens when you copy a folder with a .svn folder in it with windows explorer. Since they have the same information in .svn, they point to the same location on the server even if the local folders have different names.

To keep TortoiseSVN informed of such copies so that it can do the correct thing, you should always do move/copy/rename operations with the TortoiseSVN context menu or by right-click dragging and selecting a TortoiseSVN action.

In the next major release of SVN (1.7), the metadata will be centralized in one big .svn folder at the root of your working copy. Hopefully that will reduce the opportunity to mess up working copies with copy/move/rename operations in windows explorer.

0

精彩评论

暂无评论...
验证码 换一张
取 消