4

I have a list of changelists to be merged from the trunk to branch.

Is there a way to automate integrating multiple changelists in perforce ?

sbr
  • 4,735
  • 5
  • 43
  • 49

1 Answers1

10

You can integrate a single change by doing:

p4 integrate //depot/source/...@CLN1,CLN1 //depot/destination/...

And you then can integrate additional changes on top of that before submitting:

p4 integrate //depot/source/...@CLN2,CLN2 //depot/destination/...
p4 integrate //depot/source/...@CLN3,CLN3 //depot/destination/...

It should be easy for you to write a script that loops over a list of change numbers and executes the appropriate p4 integrate command for each one.

jamesdlin
  • 81,374
  • 13
  • 159
  • 204
  • 1
    That syntax failed for me. The correct way to do this today is with the suffix `@=1000`. See http://stackoverflow.com/a/12149115/418362. – Artfunkel Sep 17 '14 at 09:33
  • @Artfunkel As far as I know, this is still the correct way to do it. I don't know why that syntax would fail for you. (What error did you get?) `p4 help revisions` still describes using a comma (how else would you specify a *range*?), and the `@=` syntax usually refers to a shelved changeset. (FWIW, I'm using p4 2004.1.) – jamesdlin Sep 17 '14 at 10:24
  • Ah, I was using `#` instead of `@`. That would probably be the reason! – Artfunkel Sep 17 '14 at 10:56