git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jed BrownNext: Felipe Contreras
Message 6 of 7 in “[RFC/PATH 0/4] remoe-hg: switch to SHA-1 ids”
  1. Felipe ContrerasApr 5, 2013
  2. 1/4 remote-hg: shuffle some codeFelipe Contreras, Apr 5, 2013
  3. 2/4 remote-hg: improve node traversingFelipe Contreras, Apr 5, 2013
  4. 3/4 remote-hg: add version checks to the marksFelipe Contreras, Apr 5, 2013
  5. Jed BrownApr 5, 2013
  6. Felipe ContrerasApr 5, 2013
  7. 4/4 remote-hg: switch from revisions to SHA-1 noteidsFelipe Contreras, Apr 5, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.