Determining the last changelist synced to in Perforce

后端 未结 10 1763
执念已碎
执念已碎 2021-01-29 18:35

A question that occasionally arises is what is the best way to determine the changelist that you last synced to in Perforce. This is often needed for things like injecting the c

10条回答
  •  闹比i
    闹比i (楼主)
    2021-01-29 19:27

    Just to answer this myself in keeping with Jeff's suggestion of using Stackoverflow as a place to keep technical snippets....

    From the command line use:

    p4 changes -m1 @
    

    And just replace with the name of your client spec. This will produce output of the form:

    Change 12345 on 2008/08/21 by joebloggs@mainline-client '....top line of description...'
    

    Which is easily parsed to extract the changelist number.

提交回复
热议问题