I just tried to remove the patches for T404392 after they were both merged on master and backported to wmf.18, but scap didn’t like that:
lucaswerkmeister-wmde@deploy1003 /srv/patches $ scap remove-patch --message-body 'Dropping patches already made public (T404392)' /srv/patches/{next,1.45.0-wmf.18}/extensions/WikiLambda/{01,02}-T404392.patch usage: scap [-h] <command> ... scap: error: extra arguments found: /srv/patches/next/extensions/WikiLambda/02-T404392.patch /srv/patches/1.45.0-wmf.18/extensions/WikiLambda/01-T404392.patch /srv/patches/1.45.0-wmf.18/extensions/WikiLambda/02-T404392.patch
So I did it manually instead.
lucaswerkmeister-wmde@deploy1003 /srv/patches $ git rm -r 1.45.0-wmf.18/extensions/WikiLambda/ next/extensions/WikiLambda/ rm '1.45.0-wmf.18/extensions/WikiLambda/01-T404392.patch' rm '1.45.0-wmf.18/extensions/WikiLambda/02-T404392.patch' rm 'next/extensions/WikiLambda/01-T404392.patch' rm 'next/extensions/WikiLambda/02-T404392.patch' lucaswerkmeister-wmde@deploy1003 /srv/patches $ git commit [master 071e956] Drop patches already made public 4 files changed, 788 deletions(-) delete mode 100644 1.45.0-wmf.18/extensions/WikiLambda/01-T404392.patch delete mode 100644 1.45.0-wmf.18/extensions/WikiLambda/02-T404392.patch delete mode 100644 next/extensions/WikiLambda/01-T404392.patch delete mode 100644 next/extensions/WikiLambda/02-T404392.patch
Can we change scap remove-patch to accept a list of patches as command-line arguments? AFAICT it should be straightforward, just os.unlink() all of them in turn in RemovePatch._operation_on_patch().