perforcep4vchangelist

Perforce: How to find the original number of a change list


In perforce changelists get renumbered on submission. So for e.g. when the changelist was created it would be numbered 777 , but on submission of changelist it would get renumbered to say 790.

My question is how do I get the new CL number (790) , if I know the old CL number 777 , or vice versa ?


Solution

  • If you really want the original changelist number, that can be retrieved from Perforce without having to embed the original changelist number in the description. You can use the -ztag command line option to get at it. And you can only get at it through the 'changes' command (as far as I know):

    d:\sandbox>p4 submit -c 24510
    Submitting change 24510.
    Locking 1 files ...
    edit //depot/testfile.txt#2
    Change 24510 renamed change 24512 and submitted.
    
    d:\sandbox>p4 -ztag changes -m1 //depot/testfile.txt
    ... change 24512
    ... time 1294249178
    ... user test.user
    ... client client-test.user
    ... status submitted
    ... oldChange 24510
    ... desc <enter description here>
    <saved
    

    As pointed out, it's probably not that useful. However, I did want to note that it's possible to get at it.