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

时间:2015-07-08 15:45:03

标签: visual-studio svn ankhsvn

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 个答案:

答案 0 :(得分:1)

做了一些谷歌搜索.... 在VS2013,File,Subversion,Change Source Control中,我看到了:

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

“SCC绑定路径”旁边有一个“...”按钮,将解决方案根显示为:

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

(有趣的是,没有其他文件夹出现。)所以在我的情况下,选择直接指向我的项目文件夹的路径可以清除不良行为。

因此,我得出结论,Ankhsvn的默认行为总是假定整个存储库。虽然这显然可以被覆盖,但在我看来这不是一个好主意。

可能最实用的方法是:在硬盘上为每个单独的subversion存储库使用一个本地根文件夹 - 不要尝试将一个存储库中的单个文件夹微管理到不同的本地文件夹,如果你真的需要能够只检查一个单独的文件夹,可能有一个非常特定的步骤顺序(如果在Visual Studio中执行,例如与TortoiseSVN相反)。