How to rollback to previous revision for files in a folder together if revision of all the files is different using command line? I have a requirement to rollback all the files inside a folder which also contains a sub folder and the revision of all files is not same. All the solutions that i have found requires revision number for the files. So the basic procedure is
To back out changelist 1000:
- p4 sync @999
- p4 edit //depot/foo.txt //depot/bar.txt //depot/ola.txt
- p4 sync
- p4 resolve -ay
- p4 submit
As found here-
the other option is to use p4 undo command but with this the whole CL is reverted which also reverts changes which are required in my case.
This can be achieved from GUI but what are the steps to achieve the same from command line or the only option is to revert all the files one by one?
11 Answer
Use the p4 undo command.
p4 undo folder/...@1000,nowwill undo changelist 1000 and all the changelists after it. (This is the equivalent of the steps you posted -- it doesn't only roll back changelist 1000 for those files, because you synced to head in step 3!)
p4 undo @1000,@1000will undo changelist 1000 by itself.
(This also works with date ranges etc.)
2