After a while of working with perforce I was left with a lot of still open change lists. To clean up I want to get rid of a subset of them. So here is what makes this complicate:
When one or more of above points are true for a change list, p4v
(the visual client) will not allow you to delete the change list.
So what is an effective way of deleting these change lists?
First of all, perforce refuses to work on any change lists if the host differs in their workspace. So step one is to change the host of the workspace to the current one. This can easily be done with the visual client p4v
. Open the properties of a workspace, choose edit and change the host.
Then you can use the command line to get rid of the pesky change list(s):
# to delete a changelist
CLIENT="name_of_your_client"
CHANGE="number_of_the_changelist_to_delete"
p4 -c $CLIENT shelve -c $CHANGE -d //... # Delete all shelved files from it.
p4 -c $CLIENT revert -k -c $CHANGE //... # Revert all files from changelist (only metadata).
p4 -c $CLIENT change -d $CHANGE # Finally delete the changelist.
After the last command the change list will be gone forever.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With