Reapplying changelist in perforce
I'm rather new to perforce, but have quite a bit of other VCS experience...
Imagine this:
- You submit changes (changelist 1)
- A colleague submits changes on the same branch, accidentally overwriting your changes. (changelist 2)
I tried integrating (which P4V refuses to do since it's already integrated) and looked around for a way to just generate a patch that I could apply, but couldn't find anything.
For now开发者_StackOverflow, I will check out the versions in question and use an external merge tool, but it would be great to know if perforce supports this somehow.Is there a way using the perforce tools (preferably in P4V) to reapply changelist 1?
You can't reapply changelist 1, but you can reapply changelist 2.
- Sync to changelist 1.
- Check out the file(s). P4V will warn you that, "You do not have the latest revision of the file.", and ask you if you want to get the latest. Ignore the warning by clicking the "Don't Get Latest" button.
- Now sync to the head revision (I'm assuming changelist 2 corresponds to the head revision). The file(s) will now need to be resolved, which you (or your colleague) can do, properly this time, without clobbering the changes you made in changelist 1.
Probably the easiest way is to retrieve the changes from changelist 1 (//depot/...@1,@1) and then going through the normal resolve/merge+submit song and dance.
精彩评论