Re: [StGIT PATCH] Don't use patches/<branch>/current
- From
- Catalin Marinas <catalin.marinas@gmail.com>
- Date
- May 15, 2007, 21:36 UTC
- Message-ID
- <b0943d9e0705151436g64e24a32r23c45c19f750082@mail.gmail.com>
- In-Reply-To
- <20070515210801.GO19253@nan92-1-81-57-214-146.fbx.proxad.net>
On 15/05/07, Yann Dirson <ydirson@altern.org> wrote:
Show 16 quoted lines
> On Tue, May 15, 2007 at 04:56:33PM +0100, Catalin Marinas wrote: > > I think the self.__current_file (same for the base file removed in a > > different patch) should still be available in the Series object and > > removed when deleting a branch, otherwise you get a "Series directory > > .. is not empty" exception. > > Shouldn't we also migrate to new format as soon as we need to touch a > data - in this case, whenever we push/pop ? > > Or maybe declare a new "stgit stack format version" ? Currently we > have "stg branch --convert", which switches between a "new" and an > "old" format which noone probably uses any more. What about > versionning the on-disk format, and possibly provide the "convert" > functionnality back and forth between one format and the next, with > formal documentation about which version works with which stack > format ?
I think it would be useful to have a version file (probably per branch) and just upgrade when a mismatch is detected (in the __init__ function). The other option is to keep ignoring the unused files until the branch is deleted but we might make a change at some point that would break things.
We should write successive convert() functions and keep all of them in case one skips an intermediate version.
-- Catalin