Tortoise SVN:如何svn更新文件夹但不更新其子文件夹?

发布于 2024-10-05 06:16:15 字数 559 浏览 0 评论 0原文

这可能有一个简单的解决方案,但我可能根本不擅长使用 Tortoise SVN。

我前段时间检查过这个工作目录:

/folder
   file1
   file2
   /subfolder1
   /subfolder2

现在我想做的就是 SVN 更新我的工作目录,仅针对 /folder 中的文件,而不是其子文件夹。我该怎么做?

请注意,在 SVN 服务器存储库上,/folder 现在包含我想要的新文件 file3file4在 SVN UPDATE 后在工作目录中查看。

编辑因为可能还不清楚:在 SVN UPDATE 期间 SVN 不得触及子文件夹,我根本不希望它触及它们。我尝试使用Greg答案,但它不起作用,并且警告:子文件夹1和子文件夹2将在更新期间从您的工作副本中删除

谢谢。

This is probably something that has got a simple solution, but I'm probably not good at all in using Tortoise SVN.

I have this working direcetory that I checked out some time ago:

/folder
   file1
   file2
   /subfolder1
   /subfolder2

Now all I want to do is to SVN UPDATE my working directory only for the files in /folder, but NOT its subfolders. How do I do this?

Be aware that on the SVN server repository, /folder now contains new files file3, file4 that I want to see in the working directory after the SVN UPDATE.

EDIT since maybe it's not clear: subfolders MUST not be touched by SVN during SVN UPDATE, I don't want it to touch them at all. I tried to use Greg answer but it does not work and WARNING: subfolder1 and subfolder2 will get DELETED from your working copy during the update.

Thanks.

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

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

发布评论

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

评论(3

陪你搞怪i 2024-10-12 06:16:15

您可以使用以下命令以非递归方式更新 SVN:

svn update --depth=files

--深度 参数可以采用以下参数:emptyfiles、< code>immediates 或 infinity

要使用 GUI 而不是命令行执行此操作,您可以使用 Update to revisions,可在此处找到:

alt text

然后选择 Head 版本,您可以指定更新的递归方式:
alt text

根据您的情况,选择直接子项,包括文件夹 将是最合适的。

You can make SVN update non-recursively by using this command:

svn update --depth=files

The --depth argument can take the following parameters: empty, files, immediates or infinity

To do this using the GUI rather than command line, you can use Update to revision, which can be found here:

alt text

and then chosing the Head revision, you can specify how recursive the update is:
alt text

In your case, choosing Immediate children, including folders will be most appropriate.

拿命拼未来 2024-10-12 06:16:15

我通常通过“检查修改”对话框执行部分更新。我启动它,单击“检查存储库”以获取可用更新,然后右键单击我想要获取的确切项目。

I normally perform partial updates from the "Check for modifications" dialogue. I launch it, I click on "Check repository" to get available updates and then right click on the exact items I want to fetch.

澉约 2024-10-12 06:16:15

使用 TortoiseSVN 的 Update to Revision 代替 Update。指定 HEAD 作为要更新的版本(或您想要更新的任何版本),然后选中“仅更新顶级文件夹”复选框。

如果您通过 TortoiseSVN 发出 SVN 命令或者您使用命令行 SVN 客户端,Greg 的解决方案可以正常工作。

Instead of Update, use TortoiseSVN's Update to Revision. Specify HEAD as the revision to update to (or whatever revision you want to update to), and then check off the box that says "Only update the top folder."

Greg's solution works fine if you issue an SVN command via TortoiseSVN or you're using a command line SVN client.

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