[p4] Limiting integrations to files in a changelist, but getting all revisions

Ivey, William william_ivey at bmc.com
Thu Oct 6 14:19:46 PDT 2005


> -----Original Message-----
> 
> I'm used to integrating by changelist using something
> like:
> 
> p4 integrate //depot/D1/... at 555,555 //depot/D2/...
> 
> This limits the integration to the files in changelist
> 555 BUT also limits it to the revision created by
> the change list. That introduces some oddities.

Well, not as elegant as I wanted, but I think this does what
I want. At least it's reasonably short. It goes something like
this:

p4 files ./dev/X/... at 999, at 999 | sed -e "s|\(.*#[0-9][0-9]*\)[^#]*$|\1|" | p4 -x - tag -l TempLabel
p4 integrate ./dev/X/... at TempLabel ./dev/Y/...
p4 label -d TempLabel

That's three lines, each beginning with p4, in case wordwrap
mucks it up. Works on Windows or Unix as long as Windows has
a decent sed command installed. (I use cygwin's, but there are
others.)

The regular expression can be shortened a little by not forcing
it to look for the *last* #number on the line (I don't expect
you could have that combination anywhere else, I just liked the
idea). -Wm




More information about the perforce-user mailing list