Re: [p4] P4 sync order of operations

Matt Janulewicz <[email protected]> Mon, 26 Feb 2018 12:00:01 -0800
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'Matt Janulewicz'.

It's my understanding (and experience) that by default p4 sync processes
arguments in order.

Unless you use the '-L' switch, which builds a table as a whole and
syncs it all at once, in which case will get an alphabetical sync order.

As an experiment you can use explicit depot paths and revisions for a couple
files and note the difference between:

> p4 sync -n -L file1#1 file2#2
> p4 sync -n file1#1 file2#2

Then do the same with the order of arguments reversed so you can see how
'-L' sorts alphabetically.

You could also 'p4 sync' files individually.

Another tact might be to put the files in the proper order in a separate text
file and pass that in to a single p4 call:

> p4 sync -x file list -b 1 sync

'-b 1' means 'batch size 1', process one line at a time. It
still essentially does a separate 'p4 sync' for each file/line, but you
can shorthand it with a single command this way.

A curios sort might also ask why this would be necessary, and if there perhaps
is a different way to accomplish what you're trying to do.  :)



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/4781-p4-sync-order-of-operations
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user