pisek
pisek

Reputation: 1448

Is there a way to get CL from which I am integrating?

Consider the following steps:

  1. My friend is integrating CL 123 from branch //ONE to //TWO
  2. He has done a pending CL 911 with that integration and resolved all the conflicts
  3. He shelved all the files
  4. Now he disappears but manages to change the ownership of this CL to me :)

Now I have a CL 911 with integrated, shelved files.

How can I know from which CL and what branch is the integration coming from? (CL 123 and //ONE)

Upvotes: 1

Views: 180

Answers (1)

Samwise
Samwise

Reputation: 71517

Keep in mind that an integration doesn't necessarily come from a single branch or a single changelist -- your friend could have run any number of arbitrary "p4 integ FILE1#REV FILE2" commands and it may not all add up to a single coherent operation. Leaving that possibility aside, though:

p4 -F "%fromFile%%fromRev%" resolved | p4 -x - tag -l isrc
p4 changes -m1 @isrc

should get you the changelist that was used (it will be the highest changelist of any source revision involved in any of the resolves that were performed).

The branch name can similarly be inferred from the "p4 resolved" output -- if you know that your branch names correspond to one directory down in the depot you could do something like:

p4 -F "%fromFile%" resolved | head -n1 | cut -d / -f 1-4

Upvotes: 1

Related Questions