Philip Lutas
2007-04-18 10:31:33 UTC
I'm working with the C++ Perforce API and am trying to find out if a given
file is checked-out when performing a sync operation.
Currently the idea is to call pending changes for the user, iterate through
them via changelist and then find any matches with any writable files that
are to be sync'ed.
My first problem is that 'change' command doesn't appear to work with the
default changelist in the P4V client. Is the default changelist specific to
the P4V tool and if so can I workaround it?
In addition is my method for finding a checked-out file the correct/most
efficient way to do so? Is this even the right way of thinking? For instance
if I call sync on a checked-out file, should I be instead providing a way to
manage the merge? This is not ideal for the tool as it should be automated
but is something I could look into.
The files to be merged are both binary (locked to one user check-out) and
text (multiple check-outs).
Any help/opinions would be appreciated.
-Phil
file is checked-out when performing a sync operation.
Currently the idea is to call pending changes for the user, iterate through
them via changelist and then find any matches with any writable files that
are to be sync'ed.
My first problem is that 'change' command doesn't appear to work with the
default changelist in the P4V client. Is the default changelist specific to
the P4V tool and if so can I workaround it?
In addition is my method for finding a checked-out file the correct/most
efficient way to do so? Is this even the right way of thinking? For instance
if I call sync on a checked-out file, should I be instead providing a way to
manage the merge? This is not ideal for the tool as it should be automated
but is something I could look into.
The files to be merged are both binary (locked to one user check-out) and
text (multiple check-outs).
Any help/opinions would be appreciated.
-Phil