Subversion 重构主干并且仍然能够合并对旧分支的更改

发布于 2024-10-20 10:49:40 字数 514 浏览 2 评论 0原文

如果您在 svn 中重构主干,但无法将重构应用于较旧的分支,但您仍然需要能够将 svn 错误修复从主干合并到分支,那么最佳实践是什么?

更具体地提出这个问题(如果有帮助 - 如果您可以回答上述问题,那么请随意忽略):

我们希望将来转向 Maven,但我们仍然需要维护旧版本 - 除了客户之外,它们不能被触及批准的更改和错误修复。

因此,我们需要重构 trunk 中的文件夹结构,以按照 maven 获取它 - src/main/java、src/main/webapp 等(当前是一个 WTP 项目 - src、WebContent 而不是上面)。

但接下来,我们仍然需要能够 svn 合并到仍处于旧文件夹结构中的旧分支。

这可能吗?最佳实践是什么?

我知道我们可以将更改应用到主干,然后也手动将更改应用到分支,但这会给开发人员带来很多痛苦,这是我们希望避免的。

如果这个问题已经得到回答或者是显而易见的,我深表歉意(我原以为会是这样,我觉得我在问一个明显的问题!)

提前致谢, 贾斯汀

What are the best practices in the situation where you refactor trunk in svn but cannot apply the refactor to older branches, yet you still need to be able to svn merge bugfixes from trunk to the branches?

To ask the question more specifically (if it helps - if you can answer the above, then feel free to ignore):

We want to move to Maven going forward, but we still need to maintain old releases - they cannot be touched except with customer sanctioned changes and bugfixes.

So, we need to refactor our folder structures around in trunk to get it as per maven - src/main/java, src/main/webapp etc (its currently a WTP project - src, WebContent instead of above).

But then going forward, we still need to be able to svn merge to the older branches which will still be in the old folder structure.

Is this possible? What are the best practices?

I know we can apply changes to trunk, and then also apply the changes to the branch manually, but this will result in a lot of pain for developers which we want to avoid.

Apologies if this is already answered or is obvious (I would have thought it would be, I feel like I'm asking an obvious question!)

Thanks in advance,
Justin

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

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

发布评论

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

评论(1

ˉ厌 2024-10-27 10:49:40

如果你移动东西,你仍然可以使用 svn merge,但不能直接使用。 SVN 合并不跟踪移动的文件。

在最低级别,您可以基于每个文件进行合并,但是如果您移动完整的子目录,您可以一次合并每个“未触及”的子目录。还涉及更多步骤,您需要手动跟踪物品已移动的位置。

If you move things around you can still use svn merge, but not straight on. SVN merge does not track moved files.

At the lowest level you can merge on a per file basis, but if you move complete subdirectories you can merge each "untouched" subdirectories at once. There is some more steps involved and you need to track manually where things has been moved.

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