我可以(以及如何)将从主干创建的补丁应用到分支吗?

发布于 2024-10-05 03:32:32 字数 333 浏览 0 评论 0原文

我最近正在研究主干,我所做的更改我认为其他人可能需要它们,所以我在提交之前创建了一个补丁。

现在,一位正在分支上工作的开发人员(来自几周前的主干)需要这些更改才能在新服务器上进行。

我正在尝试使用 Tortoise SVN 应用我的补丁,但它并不喜欢我的工作副本的差异。我有:

  • 我的主干位于:D:\SVN\Trunk
  • 分支位于:D:\SVN\Branches\TheBranchINeedToPatch

我是否正在尝试做一些不可能的事情?我有什么遗漏的吗?

我可以将主干补丁应用到分支工作副本吗?

感谢您的帮助!

I was working on the trunk recently and the changed I did I thought others might need them so I created a patch just before committing.

Now a fellow dev who was working on a branch (which comes from the trunk a couple of weeks back) needs those changes to go on a new server.

I'm trying to apply my patch with Tortoise SVN but it does'nt seam to like the disparities of my working copies. I have :

  • My trunk at : D:\SVN\Trunk
  • The branch at : D:\SVN\Branches\TheBranchINeedToPatch

Am I trying to do something impossible ? Is there something I'm missing ?

Can I apply a trunk patch to a branch working copy ?

Thanks for the help!

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

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

发布评论

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

评论(1

晨与橙与城 2024-10-12 03:33:07

额外津贴:假设您目前在该分支机构工作。要检查这一点,请使用svn info。 url 应指向您的分支

然后您可以使用合并命令将主干的更改合并到您的分支

svn merge -r FROM_REVISION:REQUIRED_REVISION url/to/trunk .
or
svn merge -r 26:32 url/to/trunk .

这会将主干的修订版 26 到 32 的所有更改集合并到您的分支中。

啊,已经有一个关于如何使用 TortoiseSVN 执行此操作的讨论: 使用 TortoiseSVN 如何将更改从主干合并到分支,反之亦然?

Perquisite: Let's say you are currently working on the branch. To check that use svn info. The url should be pointing to your branch

Then you can merge the changes from trunk to your branch by using merge command

svn merge -r FROM_REVISION:REQUIRED_REVISION url/to/trunk .
or
svn merge -r 26:32 url/to/trunk .

This will bring all change sets from rev 26 to 32 of trunk into your branch.

Ah, there already is a discussion on how to do this with TortoiseSVN: Using TortoiseSVN how do I merge changes from the trunk to a branch and vice versa?

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