AnkhSVN 和/或 TortoiseSVN - 更改目录结构的推荐方法是什么?

发布于 2024-08-14 04:51:20 字数 540 浏览 6 评论 0原文

我是 Ankh 和 Tortoise 的新用户。目前正在开发 VS2008 应用程序套件,该套件将包含多个 .exe 文件,但包含大量通用代码。

目前,我们通过将源文件放入“共享”文件夹树中,并在所有需要编译这些文件的 VS2008 项目中使用“添加为链接”,在 .exe 项目之间共享代码。 (我们一开始使用 VisualSVN,但后来改用 Ankh,因为它能更好地处理链接文件。)

我们遇到的问题是,我们仍在积极修改共享文件夹树的结构 - 添加新文件夹,并且随着项目的发展将现有文件移入其中。

主要使用 Tortoise 来更改目录结构,但不断遇到问题 - 似乎与存储库不同步。我们收到错误消息,指出文件丢失或有关树冲突。

我怀疑问题可能是我们有时以错误的顺序做事 - 例如,忘记在移动目录然后提交之前进行更新 - 但我不确定。

所以,我的问题是:

哪个是更改目录结构的更好工具 - Ankh 或 Tortoise?

对于首选工具,必须执行哪些步骤以及按什么顺序执行?强>

I'm a fairly new user of Ankh and Tortoise. Currently ramping up on a VS2008 application suite that will have multiple .exe files, but with a lot of common code.

Currently, we're sharing code between .exe projects by putting source files in a "Shared" folder tree, and using "Add as link" in all the VS2008 projects that need to compile those files. (We started out with VisualSVN, but switched to Ankh because it dealt with linked files so much better.)

The problem we're running into is that we're still actively modifying the structure of the Shared folder tree - adding new folders, and moving existing files into them as the project evolves.

Have been mostly using Tortoise to change the directory structure, but keep running into problems - seems to get out of synch with the repository. We get error messages that say files are missing, or about tree conflicts.

I suspect the problem maybe that we sometimes do things in the wrong order - for example, forgeting to do an Update before moving directories around and then Committing - but am not sure.

So, my questions:

Which is the better tool for changing directory structures - Ankh or Tortoise?

For the preferred tool, what are the steps that must be performed, and in what order?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

小鸟爱天空丶 2024-08-21 04:51:20

我发现使用 TortoiseSVN 进行文件系统级重组要容易得多。但是,有一个问题:

使用 TortoiseSVN 在文件系统上移动文件时:

  • 右键单击​​该文件
  • 将其拖动到新目标
  • 释放鼠标右键
  • 在出现的菜单中选择“SVN 移动”

如果您只是移动文件,则无需执行上述操作后,TortoiseSVN 会变得非常困惑并按照您的描述做出反应。

I find file-system level reorganization much easier using TortoiseSVN. However, there's a catch:

When moving files on the filesystem with TortoiseSVN:

  • Right click on the file
  • Drag it to its new destination
  • Release the right mouse button
  • Select "SVN Move" in the menu that is presented

If you just move files as will without doing the above,TortoiseSVN gets very confused and reacts as you're describing.

皓月长歌 2024-08-21 04:51:20

将所有共享代码编译为 DLL,然后从其他项目引用该代码不是更容易吗?

问题是您将共享文件夹的目录结构与所有项目强耦合 - 这必然会给您带来麻烦,特别是如果它发生变化。

至于使用哪个 svn 客户端 - 我建议使用 Tortoise 进行任何不纯粹在单个 VS 解决方案中的更改,并且您组织代码的方式向我表明您正在谈论的更改与多个解决方案相关。因此,使用乌龟。

在 Tortoise 中轻松移动物体的关键是使用右键拖动功能,它可以执行 svn 感知的移动。

Wouldn't it be easier to compile all the shared code to a DLL and then reference that from the other projects?

The problem is that you are strongly coupling the directory structure of the shared folder to all your projects - which is bound to cause you trouble, especially if it changes.

As for which svn client to use - I would advise using Tortoise for any change that is not purely within a single VS solution, and the way you are orginising your code suggests to me that the changes you are talking about relate to multiple solutions. Therefore, use Tortoise.

The key to easily moving things around in Tortoise is to use the right-click drag feature, which does an svn-aware move.

送君千里 2024-08-21 04:51:20

重新组织目录结构实际上是相当棘手的,它既不是 Tortoise 也不是 Ankh 问题,而只是 Subversion 问题。

问题是 SVN 理解添加/删除,但不理解“移动”或“重命名”。因此,您有一个文件夹,其中包含相同的隐藏 .svn 元数据,但现在移动到了不同的位置,这让 SVN 感到困惑。

更新:参见 antik 的解决方案,它比手动处理元数据要好。

It's actually pretty tricky to reorganize directory structures, and it's neither a Tortoise nor an Ankh issue, it's just a Subversion issue.

The problem is that SVN understands add/delete but not "move" or "rename". So you have a folder with the same hidden .svn metadata inside it, but now moved to a different place, and this confuses SVN.

UPDATE: See antik's solution, it's better than messing about with the metadata by hand.

彡翼 2024-08-21 04:51:20

乌龟!!我在使用 AnkhSVN + VS2008 时遇到了问题。我通常在执行“提交”之前执行“更新”

Tortoise !! I have had problems with AnkhSVN + VS2008. I usually do an "Update" before I do a "Commit"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文