Determining the last changelist synced to in Perforce

后端 未结 10 1881
执念已碎
执念已碎 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:18

    The best I've found so far is to do your sync to whatever changelist you want to build and then use changes -m1 //...#have to get the current local changelist (revision).

    p4 sync @CHANGELIST_NUM p4 changes -m1 //...#have | awk '{print $2}'

    Gives you the changelist number that you can the use wherever you want. I am currently looking for a simpler way than p4 changes -m1 //...#have.

提交回复
热议问题