Ankhsvn “update solution” in VS2013 also retrieves all sibling folders not associated with the VS project

血红的双手。 提交于 2019-12-24 15:06:14

问题


I'm seeing some unexpected behavior in Ankhsvn and I'm wondering if this is possibly a bug, or by design and I'm misunderstanding something.

I'm using an online subversion repository, and have some repositories set up with this file structure:

"Browser URL": https://www.zzzzz.com/code/mememe/subversion-2/nodes/HEAD/trunk  
"Checkout URL": https://subversion.zzzzz.com/svn/abc.MyMiscProjects/

SqlScripts1 
SqlScripts2 
SomeOtherStuff1
SomeOtherStuff2
VS2013_Solution1
VS2013_Solution2

Up until now, I had been using all of these different svn repository folders with different local home folders with no problems (using TortoiseSVN).

I also have the AnkhSVN plugin installed in VisualStudio, but have been using it primarily with other SVN repositories (at the same online provider).

Yesterday from within VS2013, I created VS2013_Solution2 and when it asked if I wanted to add it to Subversion source control, I said yes. I checked in all my files, but then when I went to my home PC and from Visual Studio did a "File, Open Subversion Project", and chose the .sln file within /VS2013_Solution2, not only did it get the selected solution, but also every other sibling folder within that repository, even though they have no association with the solution.

Similarly, when this morning at work I did an "Update solution to latest version" within VS2013, it also pulled all folders from that repository down as sibling folders to VS2013_Solution2 within the local folder.

Now, if this was just the default expected behavior of svn as a whole, I would expect the exact same thing to happen when I right click my local VS2013_Solution2 folder in Windows Explorer and choose TortoiseSVN "SVN Update", but in that case it only updates the individual folder.

Is there some point I am missing here about the behavior of Ankhsvn with respect to all files in an individual SVN repository? Is it fundamentally incapable of dealing with a subset (individual subfolder) of a repository as TortoiseSVN seems to be able to do?


回答1:


After doing some more googling....
In VS2013, File, Subversion, Change Source Control, I see:

Repository: https://subversion.zzzzz.com/svn/abc.MyMiscProjects/    
SCC Binding:  ^/trunk/  
SCC Binding URL: https://subversion.zzzzz.com/svn/abc.MyMiscProjects/trunk

There is a "..." button beside "SCC Binding Path" that shows the Solution Root as:

"https://subversion.zzzzz.com/svn/abc.MyMiscProjects/trunk"  
...but in the dropdown I am also able to choose:  
"https://subversion.zzzzz.com/svn/abc.MyMiscProjects/trunk/VS2013_Solution2"  

(Interestingly, none of the other folders show up.) So in my case, choosing the path pointing directly to my project folder cleared up the undesired behavior.

So from this, I conclude that the default behavior for Ankhsvn is to always assume the entire repository. And while this can apparently be overridden, it seems to me that it wouldn't be a good idea.

Probably the most practical approach is: use one local root folder on your hard drive for each individual subversion repository - Do not try to micro-manage individual folders in one repository to different local folders, and if you really need to be able to check out just one individual folder, there is probably a very specific order of steps to do so (if doing it from within Visual Studio, as opposed to TortoiseSVN for example).



来源:https://stackoverflow.com/questions/31297537/ankhsvn-update-solution-in-vs2013-also-retrieves-all-sibling-folders-not-assoc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!