2

Is there a way to undo a specific change in Perforce? i mean not just rolling back to certain revision...

For example, i have the file "test.txt" in revisions #10, #11, #12:

The revision #10 contains:
1
2
3

Revision #11 contains:
1
2
3
3

And Revision #12 contains:
1
2
3
3
4

My file is in revision #12, and i want to 'subtract' the revision #11, which added one more '3'.

From my knowledge, i would need to sync to a previous revision (#10), and then update my file to last revision and resolve it manually, in order to keep the changes made to #10 and #12.

I wonder if there is an automatic way to do that? I know i can integrate a specifc change to a file like:

p4 integrate //depot/v1/test.txt#11,#11 //depot/v2/test.txt
but what i want here is the opposite, i mean, subtract that specifc revision..

In CVS it was possible doing this way:
cvs update -j (upper revision) -j (lower revision)

And in Git:

git.exe revert --no-edit --no-commit e5bf3a2cfc6edb4b7fa34233de458131d87e2d74

4

1 回答 1

2

我相信您正在寻找这个:Backing Out Submitted Changelists

那篇文章更笼统,讨论的案例比您的多,但步骤仍然相同,并且适用于您的案例。

特别查看标题为:Backing out a old changelist (edits only) 的小节

于 2014-05-28T00:24:18.370 回答