[p4] Using previous version of a file
Robert Cowham
robert at vaccaperna.co.uk
Thu Dec 21 11:52:35 PST 2006
> But anyway, the way to do this is to sync to version 2, make
> your changes, copy the file somewhere, then sync to latest,
> copy the file back on top of this new version, and submit
> that as your change.
This is what I call the brute force method which certainly works but isn't
particularly scalable to a changelist with lots of files.
The official way is:
http://www.perforce.com/perforce/technotes/note014.html
Once you understand what's going on with this, and why it works, it will
help you with things like merging between branches. It is not immediately
obvious, but it certainly has logic behind it.
In p4win or the CLI you can attempt a submit of an earlier version which
affects the same thing as a sync (or get latest) - i.e. does not change your
local copy of the file but does change its status to be "in conflict" (aka
"unresolved").
P4win has some useful shortcuts which make the things rather easier: sync
files in changelist to previous revision, find changelist files in depot (to
select them), Ctrl+E and Ctrl+Y to open for edit/sync respectively. Resolve
automatically with Accept Yours and then submit.
Robert
More information about the perforce-user
mailing list