February 8, 2011

Want a faster way to promote code?

Product Branding
Healthcare
Branching

Would you like a faster way to promote your code than p4 integrate and then a p4 resolve -at? If so, then check out the new "p4 copy" command in 2010.2! It does the whole process without looking at integration history.

As a nice side benefit, it will make sure you are getting a correct promotion without having to do extra diff steps after the integrate to look for ignores in the integration history because it is doing the integrate based on diffs between the two branches. A great new 2 for 1 command. Performance and less work to do a "copy up" integrate.

One important caveat is that if you rely on 'p4 changes -i', 'p4 fixes -i' or 'p4 jobs -i' to verify bug fix propagation, you should not use 'p4 copy' for branching or promotion. The other is that 'p4 copy' only operates on files that don't match. So after 'p4 copy', you might find that a 'p4 integ -n' (or 'p4 interchanges') shows changes still needing to be integrated.