delete a submitted changelist from perforce history

只愿长相守 提交于 2019-12-12 10:52:16

问题


I accidentally submitted a wrong changelist to my perforce server. I then backed out that changelist using the "backout changelist" option. But, these two changes appear in the history of all those affected files that they were once deleted and then added back again.

I want to be able to delete the history from perforce server of these two changelists. Is it possible. Can it be done via some Perforce administrator command.

EDIT: I have seen p4 change -d -f which can delete a changelist but this requires to use p4 obliterate on the files which were there in the changelist. Does this mean that I have to obliterate all the files which were affected by the changelist. This doesnt seem a viable solution for me as I do not want to delete those files. Should I only obliterate those specific two revisions of the files due to the two submitted changelists?


回答1:


Your perforce administrator could call p4 obliterate to completely wipe out files, revisions and history. But I'd strongly advise not to do so. It's a perfectly normal thing to rollback files/changes and to see the history of it.

In case you still decide to use p4 obliterate make sure you call it without the "-y" option first (preview) and then (if the output of what perforce says will happen is ok) call the same command with the "-y" option (to actually perform the obliterate).

If you call p4 obliterate with a file revision (e.g. p4 obliterate //depot/dir/file#5) then only the changes and history of that revision will be removed leaving all previous revisions and history intact. You can also obliterate a revision range.



来源:https://stackoverflow.com/questions/13024386/delete-a-submitted-changelist-from-perforce-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!