Reputation: 661
I shelved files from my local desktop with changeset ex. 244444.
Then I ran the below command to unshelve the files on my other server:
p4 unshelve -s 244444
This pending changeset contains 3 files. Now after testing, I want to revert all the changes (due to changeset 244444).
How can I do this?
I tried:
p4 revert -c 244444
but that doesn't seem to help.
Upvotes: 1
Views: 1306
Reputation: 71562
When you run p4 unshelve
, the files are unshelved from the shelved changelist you specify with -s
, into a pending changelist. If you don't specify a numbered changelist, they'll be unshelved into the default changelist. If the files are already open in a numbered pending changelist, they'll remain in that changelist, and the unshelve operation will schedule resolves to merge the shelved changes with your pending changes.
To see which pending changelist(s) you have files opened in, do:
p4 opened
To revert all files in the default changelist, do:
p4 revert -c default //...
If you're not sure which pending changelist the files are in, and you're not able to figure it out from p4 opened
(or the list of files is too large), but you want to revert anything that might have been unshelved from change 244444, you could take the list of files in change 244444 and pipe those to p4 revert
:
p4 -F %depotFile% files @=244444 | p4 -x - revert
Upvotes: 2