gpt4 book ai didi

perforce - perforce,是否可以从另一个更改列表中减去一个更改列表的更改?

转载 作者:行者123 更新时间:2023-12-04 10:37:04 27 4
gpt4 key购买 nike

假设,我有两个变更列表 A 和 B(位于 A 之上)。
现在,我只想要在 B 中完成的更改,而不是包含在 A 中的更改,即 B-A
有可能这样做吗?

最佳答案

是的。做:

p4 undo @A,A
p4 sync @B

这将创建一个新的待定更改列表,即“B 减去 A”。如果 A 和 B 接触相同的文件,则同步到 @B将需要决心将 B 的更改合并到文件中(没有 A 的更改)。合并的设置方式将使一切尽可能自动发生。

如果以后有其他对相同文件的更改,您将需要 syncresolve就像您在处理较旧的更改列表时所做的那样。

这在理论上在 P4V 中也是可行的(我认为这是“退出”命令),但我对此有不好的经历,不推荐它。从命令行开始非常简单。

例子
C:\Perforce\test\undo>p4 annotate -c foo
//stream/main/undo/foo#3 - edit change 137 (text)
135: this
136: is **CHANGE A**
135: a
137: test **CHANGE B**
135: file

更改 A 为 @136,更改 B 为 @137。
C:\Perforce\test\undo>p4 undo @136,136
//stream/main/undo/foo#2 - opened for integrate
... undid //stream/main/undo/foo#2

C:\Perforce\test\undo>p4 sync @137
//stream/main/undo/foo#3 - is opened and not being changed
... //stream/main/undo/foo - must resolve #3 before submitting

C:\Perforce\test\undo>p4 resolve -am
c:\Perforce\test\undo\foo - merging //stream/main/undo/foo#3
Diff chunks: 1 yours + 1 theirs + 0 both + 0 conflicting
//compy386/undo/foo - merge from //stream/main/undo/foo

C:\Perforce\test\undo>p4 submit -d "undid A"
Submitting change 138.
Locking 1 files ...
integrate //stream/main/undo/foo#4
Change 138 submitted.

更改 136 现在已被更改 138 撤消:
C:\Perforce\test\undo>p4 annotate -c foo
//stream/main/undo/foo#4 - integrate change 138 (text)
135: this
138: is
135: a
137: test **CHANGE B**
135: file

C:\Perforce\test\undo>p4 filelog foo
//stream/main/undo/foo
... #4 change 138 integrate on 2020/02/08 by Samwise@compy386 (text) 'undid A'
... ... undid //stream/main/undo/foo#2
... #3 change 137 edit on 2020/02/08 by Samwise@compy386 (text) 'change B'
... #2 change 136 edit on 2020/02/08 by Samwise@compy386 (text) 'change A'
... ... undone by //stream/main/undo/foo#4
... #1 change 135 add on 2020/02/08 by Samwise@compy386 (text) 'test file'

关于perforce - perforce,是否可以从另一个更改列表中减去一个更改列表的更改?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60125732/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com