Re: [RFC/PATH 3/4] remote-hg: add version checks to the marks
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 5, 2013, 22:29 UTC
- Message-ID
- <CAMP44s3o2ewvJiyvOBqEM5ztByEzdRCLHXpVYHe3=okjfr6L8A@mail.gmail.com>
- In-Reply-To
- <8738v5qh5v.fsf@59A2.org>
On Fri, Apr 5, 2013 at 6:46 AM, Jed Brown <jed@59a2.org> wrote:
Show 15 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > >> @@ -76,12 +78,19 @@ class Marks: >> >> def __init__(self, path): >> self.path = path >> + self.clear() >> + self.load() >> + >> + if self.version < VERSION: >> + self.clear() > > It's friendlier to just upgrade the marks in-place. This takes less than > one second to run on repositories where full re-import would take half > an hour:
Yeah, but that's riskier, and only works for this particular version. Besides, it only happens one time per repository at best. Also, it would mess up the current organization of the code. I'm not sure it's worth worrying about it at this point, and we could always add a patch on top.
-- Felipe Contreras