AnkhSVN - 管理 VS *项目*而不是*解决方案*
我从事几个不同的软件项目,并开始构建一些具有实用功能的通用库,我在所有这些项目中都使用了这些功能。最近,我在不同的物理位置同时进行三四个项目,手动同步库非常痛苦。
所以我想我应该为这些库创建一个存储库,这样我就可以从任何地方访问它们。我将最后一次坐下来在项目之间同步它们,提交它们,从现在开始,我将拥有存储库来确保我保持一切正常,并保持库的最新版本与所有相关项目一起使用。
因为我在 Visual Studio 2010 中工作,所以我选择了 AnkhSVN。令我沮丧的是,它似乎不允许您仅管理解决方案中的项目——只能管理整个解决方案!
我按照此处;他们很清楚。显然,SVN“项目”不是 Visual Studio“项目”,这有点令人困惑。
因此,我在解决方案资源管理器中选择一个项目,右键单击它,然后选择“将选定的项目添加到 Subversion...”。弹出的窗口使用标记为“项目名称”的字段的解决方案名称。这是一个麻烦的迹象,但我可以手动将其更改为实际的项目名称。然后我可以选择一个存储库,并为此项目创建一个文件夹。到目前为止,一切都很好。
但对于“本地文件夹”,它是一个下拉列表,默认选择是解决方案的位置,唯一的其他选项是在树上向上移动。如果我保持原样并单击“确定”,AnkhSVN 会将整个解决方案放入我创建的目录中(假设仅适用于选定的项目)。
事实上,如果我选择“将解决方案添加到 Subversion...”,我会得到一个相同的窗口。
我希望 Subversion 仅管理解决方案中的某些项目。通过本地解决方案,我可以确保我的库具有通用性;我不只是链接到构建,而是将整个源代码添加到每个解决方案中,因此更改是“全局的”。现在我需要对物理上不同位置的解决方案执行此操作,显然 AnkhSVN 不允许我执行此操作?是它坏了还是设计使然?
I work on several different software projects and I started building up some generic libraries with utilitarian functions that I use in all of them. Recently I had three or four projects going at once at different physical locations and it got painful to synchronize the libraries manually.
So I figured I should create a repository for these libraries so I can access them from anywhere. I'll sit down one final time to synchronize them between projects, commit them, and from now on I'll have the repository to make sure I keep things straight and keep the most recent version of the library working with all the relevant projects.
Because I'm working in Visual Studio 2010 I went with AnkhSVN. To my dismay, it does not seem to allow you to manage only projects within a solution---only the entire solution!
I go by the instructions here; they're pretty clear. There is some minor confusion in that an SVN "project" is not a Visual Studio "project", apparently.
So I select a project in the Solution Explorer, right click on it, and select "Add Selected Projects to Subversion...". The window that pops up uses the solution name for the field labeled "project name". That's a sign of trouble, but I can manually change it to be the actual project name. Then I can choose a repository, and create a folder for this project. So far so good.
But then for "local folder" it's a drop down list with the default selection being the location of the solution, and the only other options are moving farther up the tree. If I leave it as is and hit OK, AnkhSVN wants to put the entire solution in that directory I created (assumingly only for the selected project).
In fact if I select "Add Solution to Subversion..." I get an identical window.
I want Subversion manage only certain projects within a solution. With local solutions, that's how I make sure I keep my libraries universal; instead of just linking to the build I add the entire source to each solution so changes are "global". Now I need to do this for solutions at physically different locations and apparently AnkhSVN won't let me do this? Is it broken or is this by design?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
没有“标准”方法来提供 UI 来处理这种情况,但如果您只是签出工作副本并将所有项目放在一个布局中,AnkhSVN 将只提供处理该项目的所有工具。
AnkhSVN 团队正在解决的真正难题是如何提供必要的 UI 来轻松处理此类布局。如果项目是由位于硬盘驱动器不同部分的不同树组成的,则没有简单的方法来布局您的项目。
某些项目的解决方法可能是创建一个父工作副本,其中外部 (
svn:externals
) 指向单独的项目。在这种情况下,签出根项目将自动引入其他项目。There is no 'standard' way of providing a UI to handle this situation, but if you just checkout your working copies and bring all of the projects in a single layout AnkhSVN will just provide all the tools to work on this project.
The really hard problem -where we as AnkhSVN team are working on- is how we can provide the necessary UI to work with this kind of layouts easily. There is no easy way to layout your project if it is made out of different trees that live in different parts of your harddrive.
A workaround for some projects might be to create a parent working copy with externals (
svn:externals
) pointing towards the separate projects. In that case checking out the rooot project will automatically bring in the other projects.看起来这个问题自 2008 年以来就已为人所知,但开发人员认为这个问题还不够重要。
http://ankhsvn.open.collab.net/ds /viewMessage.do?dsForumId=582&dsMessageId=152095
It looks like this has been known since 2008 and the developers don't think it's important enough of an issue.
http://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=582&dsMessageId=152095
您可以按照这种方式进行。
在为所有项目制定解决方案之前,请按照以下步骤操作。
它在 svn 中有自己的目录结构)
通过这种方式,您可以仅将更改提交到所需的项目,并且提交不会捆绑到解决方案。
稍后您可以轻松地将项目与解决方案分开(删除、移动到其他解决方案等)。
You can proceed in this way.
Before make a solution with all projects follow the steps.
it's own directory structure in svn)
In this way you can commit changes just to desired project and commits are not bundle to solution.
Later on you can easily separate projects from solution (delete, move to other solutions, etc).