[p4] Few questions about Perforce basics
perforce-user-forum at forums.perforce.com
Tue Jul 2 17:00:01 PDT 2013
Posted on behalf of forum user 'P4Sam'.
pbeska, on 2013/07/02 14:30:50 UTC, said:
> 1. How to revert files without removing them from changelist ?
Reverting an open file makes it no longer open, which means it's no longer
in a pending changelist. There isn't a command in P4V to replace
an open file's contents with its depot counterpart while leaving it open;
that would be a good "custom tool" use case. I'd
implement it by using "p4 print" to overwrite the local file:
p4 print -o %f %d#have
You could also do this by reverting the file ("p4 revert %d") and then
immediately re-opening it for edit ("p4 edit %d")
> 2. Where is in p4v some advance search system ? (I want for example find submits from Peter, files *.cpp from 1/10/12 to 1/10/13 , How can I do it ? )
In the submitted changelist tab there are "+" buttons you can use to
add search criteria. User, path, and date range are all criteria that
you can add.
> 3. How can I generate something similar to SVN patchdiff ? (I have some changes and I want to give it only one person)
The standard way of doing this in Perforce is to "shelve" the changes;
they aren't committed into the permanent history of the depot, but the other
user can unshelve (open) them in their own workspace with the contents as of the
time that you shelved.
You can also generate patch-like output from the command line with "p4 diff
-du", but if the goal is to give another user a copy of your changes,
shelving is much simpler.
> 4. How can I commit file locally ? (only for myself)
This would also be a typical use case for shelving. Other options
include using P4Sandbox [http://www.perforce.com/p4blog-categories/p4sandbox]
or creating a development branch
-- which option you use would depend on whether you need your local commits to
be versioned and whether you need them to be available when you're not
connected to the central server.
Please click here to see the post in its original format:
More information about the perforce-user