[p4] Offline reconciliation: what files need to be added?

Jeff A. Bowles jab at pobox.com
Thu Jun 14 05:50:27 PDT 2007


I believe that "p4unknown.pl/p4unknown.py/p4unknown.rb"
in//guest/jeff_bowles/scripts/...
(public depot) is worth your time.

%  grep '^#' * p4unknown.pl*
# T*ask: determine which files need to be "p4 add'ed."*
#
# *num of calls to 'p4': 2*
#-----------------------------------------------------------
# *first call to P4: 'p4 info'*
#-----------------------------------------------------------
#-----------------------------------------------------------
# *second call to P4: 'p4 fstat //myclient/...'*
#-----------------------------------------------------------
#
*# at this point, we create two assoc. arrays to hold*
*# the filenames:*
*#     allFilesPerforce - from "p4 fstat //myclient/..."*
*#     allFilesPresent  - from "File::Find" mechanism*
*# We can walk through the two lists of files to find*
*# what's missing (and probably why).*

-Jeff Bowles

On 6/13/07, Stephen Vance <steve at vance.com> wrote:
>
> I've seen it also implemented with fstat.
>
> Steve
>
> Marc Wensauer wrote:
> > This KB article provides very useful information on how to reconcile
> > offline changes:
> > http://kb.perforce.com/UserTasks/WorkingDisconnected
> >
> > For my purposes though, I need to *query* what needs to happen before
> > actually doing it.  For the most part, it's trivial to see what files
> > will have to opened for delete and edit via 'p4 diff -sd' and 'p4 diff
> > -se' respectively.
> >
> > But how do I query my workspace for files that *would* have to be added?
> >  The 'find . -type f | p4 -x - add' recommendation is rather
> > brute-force, and doesn't avoid actually performing the operation instead
> > of just telling me about it.
> >
> > How might one query for this information?  A recursive 'p4 files' and
> > grep for "no such file(s).", or is there something else I should
> > consider?
> >
> > Thanks for your advice,
> > -Marc
> > _______________________________________________
> > perforce-user mailing list  -  perforce-user at perforce.com
> > http://maillist.perforce.com/mailman/listinfo/perforce-user
> >
> >
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>



-- 
---
Jeff Bowles - jeff.a.bowles at gmail.com


More information about the perforce-user mailing list