Misleading behavior of Export patch
Created originally on Bitbucket by gonzalocasas (Gonzalo Casas)
Export patch appends the export to existing files without any indication of doing it so. Not only is this very unintuitive, but also there's no message indicating that this happened. The end result is a corrupted patch, that behaves as two patches.
====== Steps to reproduce: ======
Commit revision abc
Export revision abc to folder A
Export again revision abc to folder A
You will get only ONE file, containing twice the same revision, and no message to the user, not even a warning about this.
IMO, the expected behavior is that "Export patch" asks for a file name (I never want to keep the default name), and will obviously show a warning box before it overrides (not append) in case the same file already exists.
If you prefer to keep the current behavior of Export not asking for a patch file name, then the solution could be to warn the user if the file already exists, and give the option to 'override' or 'cancel'.
Note that this is actually a very common scenario, it's not limited to plain dumb "export twice" behavior; export uses the revision number for the file name, not the hash, so if you work a lot with patches, or you're stripping and creating new patches on top of the same base revision all the time, you're very likely to fall into this situation.