perforce 中多个更改列表中的同一文件

发布于 2024-07-26 04:57:35 字数 141 浏览 3 评论 0原文

有什么方法可以让同一个文件成为多个更改列表的一部分吗? 我的意思是,从文件中的一组已更改行中,一个子集将属于更改列表,而另一个子集将属于第二个更改列表。

额外问题:如果 perforce 不支持这一点,那么哪个源代码控制系统(如果有)可以支持?

Is there any way to have the same file be a part of multiples changelists in perforce? With that I mean that from the set of changed lines in the file one subset will belong to a changelist, while the other subset will belong to a second changelist.

Bonus question: If perforce does not support this, then which Source Control Systems, if any, do?

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

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

发布评论

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

评论(6

╰◇生如夏花灿烂 2024-08-02 04:57:35

要回答额外的问题: GIT 允许每行更改列表。

有关两者之间的比较,请查看此问题: GIT 与.Perforce- 两个 VCS 将进入...一个将离开。

To answer the bonus question: GIT allows for per-line changelists.

For a comparison between the two view this question: GIT vs. Perforce- Two VCS will enter... one will leave.

小梨窩很甜 2024-08-02 04:57:35

文件的相同副本? 不,不幸的是这是不可能的。

The same copy of the file? No, unfortunately this isn't possible.

感性不性感 2024-08-02 04:57:35

另一种无需分支的方法是创建额外的工作区(客户端)。 除非您真的知道自己在做什么,否则请务必在每个工作区中设置不同的根目录。 为了节省时间(和磁盘),不必费心在新工作区中同步整个软件仓库。

有时,我会有两个仓库副本(使用两个工作区); 一份包含正在进行的工作,一份我保持未修改。 如果我需要对 WIP 工作区中经过大量修改的文件进行快速更改,我可以使用“原始”工作区进行更改并提交。

Another way to do this without branching is create additional workspaces (clients). Unless you really know what you're doing, be sure to set a different root directory in each of your workspaces. To save time (and disk), don't bother syncing the whole depot in the new workspace.

Sometimes, I'll have two copies of a depot (using two workspaces); one which contains work-in-progress and one which I keep unmodified. If I need to make a quickie change on a file that's heavily modified in my WIP workspace, I can use the 'virgin' workspace to make the change and submit it.

善良天后 2024-08-02 04:57:35

如果您使用的是 p4 server 2009.2,有一个解决方法可以做到这一点。 您可以搁置特定文件,并将差异存储在服务器上。 搁置后,您可能希望将文件恢复到其原始版本,然后在另一个更改列表中处理它。
我知道这不是您想要的方式,但创建另一个工作区/客户端然后同步代码非常容易。 当您有大量代码进入另一个应用程序时,后面的练习会变得更加乏味。

有关更多信息,请阅读:

If you are using p4 server 2009.2, there is a workaround to do it. You can shelve a particular file and the diff is stored on the server. After shelving you may want to revert the file to its original version and then work it on in another change-list.
I know this is not a way you wanted it but it is quite easy to create another workspace/client and then sync the code. The later exercise becomes more tedious when you have volumes of code that goes into another application.

For more info read:

旧梦荧光笔 2024-08-02 04:57:35

您可以制作包含所有更改的文件副本、恢复、编辑文件将一组更改复制到文件中、提交、编辑、复制下一组更改、提交、编辑等...

You could make a copy of the file with all of the changes, revert, edit the file copy one set of changes into the file, submit, edit, copy the next set of changes, submit, edit, etc...

离去的眼神 2024-08-02 04:57:35

额外的答案:我在 Rational Team Concert (http://www- 03.ibm.com/software/products/en/rtc/)。 您可以在许多变更集中拥有相同的文件。 如果要将 File1 添加到 Changeset1 和 Changeset2,则必须先完成 Changeset1。 这允许您将文件 2 添加到 Changeset2,但随后会创建变更集之间的依赖关系,因此您无法在不交付 Changeset1 的情况下交付 Changeset2。 此外,您无法对完整的变更集进行更改。

Bonus answer: I found this feature in Rational Team Concert (http://www-03.ibm.com/software/products/en/rtc/). You can have the same file in many changesets. If you want to add File1 to Changeset1 and Changeset2, you must complete Changeset1 first. This allows you to add File 2 to Changeset2 but then a dependency between changesets is created, so you can not deliver Changeset2 without delivering Changeset1 too. Moreover you can not make changes to a complete changeset.

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