Re: [StGIT PATCH 0/2] Fix issues with series deletion
- From
- Catalin Marinas <catalin.marinas@gmail.com>
- Date
- Jun 7, 2007, 21:50 UTC
- Message-ID
- <b0943d9e0706071450u1587d109x1e592bfa453c0c0@mail.gmail.com>
- In-Reply-To
- <20070606205852.7657.69286.stgit@gandelf.nowhere.earth>
On 06/06/07, Yann Dirson <ydirson@altern.org> wrote:
Show 8 quoted lines
> I am however not happy at all with the way we delete patches and > series, starting with an existence check and then deleting. If any > error occurs midway, then we are left with an inconsistent state that > the user has to cleanup by hand. IMHO, we should have those methods > be as robust as possible, maybe starting by removing the formatversion > item, and printing a "cleaning up zombie stack" if does not find it. > So at least after fixing a "delete" bug, we could rerun the same > command and get to a sane state again.
This sounds OK for a quick fix. Longer term, I think we should support some kind of transactions. One idea is to put the StGIT metadata in a single file (or maybe two if we include the config) that gets checked in after every operation.
-- Catalin