[p4] Offline reconciliation: what files need to be added?
Shawn Hladky
p4shawn at gmail.com
Wed Jun 13 16:30:35 PDT 2007
You can use p4 add -n, and filter the "can't add ...". This one-liner
should do the trick:
find . -type f | p4 -ztag -x - add -n | grep clientFile | cut -b 16-
or, in Windows:
for /f "tokens=2,*" %i in ('dir /b /s /a:-d ^| p4 -ztag -x - add -n ^|
findstr /c:"... clientFile"') do @echo %j
On 6/13/07, Marc Wensauer <maillist.perforce.com at work.wnsr.net> 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
>
More information about the perforce-user
mailing list