I'm facing a small issue with the automatic patch naming.
IIRC, the patch name is built based on the changeset id. If an unapplied patch has already that name, a suffix (_01, _02, ...) is added to the name.
This approach fails if the such _01 patch was created previously but no more in the patch queue but still in the .hg/patches directory (e.g. after a fold when keeping the folded patch).
Is there a better way to proceed than the current one in getUniquePatchName (repowidget.py)?