[p4] How to sync only files already present?

Weintraub, David david.weintraub at bofasecurities.com
Wed Oct 4 12:01:26 PDT 2006


I just did this, and this was pretty quick:

$ find . -type f | p4 -x - sync

I don't know how efficient this is because you're running sync for each
file on your drive. The best bet would be to create a view for your
client using shell scripting. Maybe something like this?

$ find . -type f | p4 -x - where | awk '{print "\t" $1 " " $2} >>
view.txt

If there are no spaces in your file or directory names, this will create
a view spec based upon the current files in your directory. Then you
only need to run "p4 sync" once, and let the magic of Perforce take
over. If there are, you're in trouble. I can't get "-ztag" to work with
the "-x" option which woulr help handle the spaces in file names
situation.

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Peter Steiner
Sent: Wednesday, October 04, 2006 5:02 AM
To: perforce-user at perforce.com
Subject: [p4] How to sync only files already present?

I have a rather large client where I sync only hand-picked
directories/files.

What's the best way to find out if there are newer revisions in any of
these files?

I have come up so far (on Windows with cygwin) with

p4 files #have | cut -s -d "#" -f 1 | p4 -x - sync -n 2>nul

but this takes some time. Does anybody know a simpler and/or faster way
to achieve this (command line, P4Win or P4V)?

Regards, Peter
-- 
    _   _        Peter Steiner <peter.steiner at hugwi.ch>
  / /_/ /        Hug-Witschi AG <http://www.hugwi.ch/>
 /  _  /         Electronic Engineering
/_/ /_/  _   _   Auriedstrasse 10
   / / / / / /   CH-3178 Boesingen
  / /_/ /_/ /    Tel  +41 31 740 44 44
 /_ _ _ _ _/     Fax  +41 31 740 44 45
_______________________________________________
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