[PATCH] obsolete: add operation metadata to rebase/amend/histedit obsmarkers

Jun Wu quark at fb.com
Tue May 9 20:18:16 EDT 2017


Excerpts from Durham Goode's message of 2017-05-09 17:07:33 -0700:
> On 5/9/17 4:55 PM, Martin von Zweigbergk wrote:
> > On Tue, May 9, 2017 at 4:34 PM, Durham Goode <durham at fb.com> wrote:
> >> # HG changeset patch
> >> # User Durham Goode <durham at fb.com>
> >> # Date 1494372571 25200
> >> #      Tue May 09 16:29:31 2017 -0700
> >> # Node ID 22051b0924bcbc5cde6d25d700dcce6afcaafd98
> >> # Parent  8f1a2b848b52ea7bf3fe2404e3b62924c7aae93f
> >> obsolete: add operation metadata to rebase/amend/histedit obsmarkers
> >>
> >> By recording what operation created the obsmarker, we can show very intuitive
> >> messages to the user in various UIs. For instance, log output could have
> >> messages like "Amended as XXX" to show why a commit is old and has an 'x' on it.
> >
> > Nice! I had previously assumed that that information was already in
> > the obsmarker, but then I didn't find it in `hg debugobsolete`. I
> > didn't realize it would be so easy to add. Seems like an obvious
> > improvement. So obvious that I'm hesitating to queue it only because
> > it seems like it should have been proposed before. Any idea why that
> > hasn't happened?
> 
> It increases the size of the obsstore a bit, since I think the metadata 
> key is serialized every time. If we wanted to save a few bytes, we could 
> use something like 'o' as the key, since this would be a common entry. 
> But we don't do that for 'user' and it's a common entry, so... *shrug*

Another idea is to dedup all strings in obsstore. Existing metadata is also
highly repetitive.

> This topic came up once before and Pierre-Yves had comments, so he may 
> have comments this time.


More information about the Mercurial-devel mailing list