I want to test a fix and to compare the behavior before the fix vs. now; I need to sync to a the earlier version. So, if the fix was committed in revision x; how can I sync to one revision before, say x0?
The Perforce sync command synchronizes your workspace files with the files in the depot. Syncing uses your client spec to determine which depot files to get and where to put them in your workspace. To look at or edit your client spec, click your client name at the top of any screen in P4Web .
You can rollback to a point in time based on revision number, changelist number, date, or label. To rollback a file or folder to a previous revision using P4V, context click on the file or folder and select the Rollback menu option.
p4 flush changes the have list to match whatever you tell it to match (if no arguments, then #head is the default).
When you are using P4 Windows client, you may cancel a long running sync operation by pressing the red cancel button.
Say that you want to go back to revision 'n' from revison 'n+1' (rollback). You can take the following steps:
p4 sync ...@n
This will sync your files to the older version that you want
p4 edit ...
Open all the files for edit or do "p4 edit filename" to open only a particular file for editing.
p4 sync ...@n+1
Before submiting you need to sync files to the latest revision on the repository.
p4 resolve -ay
This will accept the changes that you have made, ie, revert all the changes done when you moved from revision 'n' to 'n-1'. So effectively, all your files have been rolled back to revision 'n' in your local repository.
p4 submit ...
Go ahead and submit the changes. This will roll back all main repository to revision 'n'. Effectively the revisions 'n' and 'n+2'(current) will be identical.
p4 diff2 -q repository@n repository@n+2
This is just to verify if have rolled back the files. This should show that you have no differing files in the two revisions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With