是否可以将修订历史记录集成到 Perforce 中?

发布于 2024-11-17 04:44:48 字数 200 浏览 2 评论 0原文

我们正在研究 Perforce 中的工作流程,为每个功能项目创建一个新的临时分支。当项目稳定时,它们会重新集成到我们的主分支中。接下来,我们希望从存储库中删除旧的项目分支。但是我相信这也会删除分支中修改的文件的所有修订历史记录。是否可以将项目分支的修订历史记录集成到主分支中?

我考虑过的一种解决方案是在将代码合并回主分支时手动集成每个单独的签入。这似乎不是正确的方法。

We are investigating a workflow in Perforce where we create a new temporary branch for every feature project. When projects are stable, they're integrated back into our main branch. Down the line, we would like to remove old project branches from the repository. However I believe this will also delete all revision history for the files modified in the branch. Is it possible to integrate the revision history from the project branches into the main branch?

One solution that I've considered is to manually integrate each individual checkin when merging code back into the main branch. This does not seem like the right approach.

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

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

发布评论

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

评论(3

童话里做英雄 2024-11-24 04:44:48

修订历史记录是针对它们所应用的分支存储的,因此不可能从一个分支合并到另一个分支。您关于集成项目分支中的每个变更列表的想法将会起作用,但正如您所指出的那样,这也是一个痛苦。

The revision histories as stored against the branch they are applied to, so it is not possible to merge from one to the other. Your idea about integrating each changelist from the project branch will work, but is also a pain as you have pointed out.

咋地 2024-11-24 04:44:48

多年来,我广泛使用了分支,但我不记得我们希望在主线中拥有分支修订历史记录,甚至在分支合并回分支后查看分支修订历史记录的情况。主线。

合并后,您将在一段时间内(尽管不是直接)获得修订历史记录,并且(理想情况下)您签入主开发分支的任何内容都应该通过所有单元测试,因此它中断的可能性应该 被最小化。

I've made extensive use of branching over the years and I can't remember a case where we wished we'd had the branch revision history in the main line or even looked at the branch revision history after the branch was merged back into the main line.

You'll have the revision histories available (though not directly) for a while after a merge and (ideally) anything you check in to the main development branch should pass all the unit tests so the chances of it breaking should be minimised.

青瓷清茶倾城歌 2024-11-24 04:44:48

首先,为什么要从存储库中删除分支?您是否注意到多个分支会影响性能(或期望如此)?对于每个“临时”分支,您是否都会获取主线的完整副本?另外,为什么您认为这些分支是“临时的”,我认为如果它们是用于某个功能,那么它们就不是并且应该保留。

一些值得阅读的文章:
- P4 KB 稀疏分支
- P4 博客:Perforce 反模式过度分支

我相信,但不知道更多信息,您可以:使用稀疏分支,使这些“临时”分支永久存在,如果您确实需要临时分支,则为每个开发人员创建一个私有工作分支。

First of all, why do you want to remove the branches from the repository? Are you noticing having multiple branches to affecting performance (or expecting it to)? For each 'temporary' branch are you taking an entire copy of the main line? Also why do you consider these branches 'temporary', I would argue if they are for a feature then they are not and should be preserved.

A few articles to read:
- P4 KB Sparse Branching
- P4 Blog: Perforce Anti-Patterns Over-Branching

I believe, without knowing more information, that you could: use sparse branching, make these 'temporary' branches permanent, and if you really have a need for a temporary branch create a private working branch for each of your developers.

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