Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As I am on Windows, I have created a little script doing the exact same thing in PERL, rather than Shell, powershell or px :) :</p> <pre><code>#******************************************************************************* # Module: delete_empty_changelist.pl # Purpose: A script to delete empty changelist # @list = `p4 changes -s submitted`; foreach $chg (@list) { $chgnbr = (split /\s+/, $chg)[1]; print `p4 change -d -f $chgnbr`; } exit 0; </code></pre> <p>Note that in fact, in all cases, it's not a very clever script: It tries to delete absolutely every submitted changelist, and is prevented by perforce to do so, because if files are associated with it, you will get an error.</p> <p>I suppose the result of the script should be sent to a log, and parse, so that only the relevant lines are highlighted.</p> <p>Running the script will produce an output similar to:</p> <pre><code>Change 857 has 1 files associated with it and can't be deleted. Change 856 has 1 fixes associated with it and can't be deleted. Change 855 has 1 fixes associated with it and can't be deleted. Change 854 deleted. Change 853 has 1 fixes associated with it and can't be deleted. Change 852 has 8 files associated with it and can't be deleted. Change 851 has 1 files associated with it and can't be deleted. Change 850 has 2 files associated with it and can't be deleted. Change 849 has 2 files associated with it and can't be deleted. Change 846 deleted. Change 845 has 2 files associated with it and can't be deleted. </code></pre> <p>Cheers,</p> <p>Thomas</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload