[PATCH 3 of 4] log: add a marker for closed heads

Matt Mackall mpm at selenic.com
Thu May 13 15:49:18 CDT 2010


On Thu, 2010-05-13 at 16:32 +0200, Gilles Moris wrote:
> On Wednesday 12 May 2010 11:33:30 pm Gilles Moris wrote:
> > On Wednesday 12 May 2010 05:56:23 pm Matt Mackall wrote:
> > > Again, my plea to show us what it looks like up front.
> > >
> > > > changeset:   11:c84627f3c15d
> > > > + (closed)
> > > >  branch:      b
> > > >  user:        test
> > > >  date:        Thu Jan 01 00:00:09 1970 +0000
> > >
> > > Yuck!
> > >
> > > Folks, you have to be more imaginative. And by that, I mean you're
> > > failing to imagine just how stupid and LAZY your fellow programmers and
> > > admins have already been when coding up hacks IN SHELL SCRIPTS to parse
> > > these things for their build systems after we've guaranteed they won't
> > > change.
> > >
> > > We can't stick a new line in there. And we definitely can't stick in a
> > > line without a colon! Nor can it go at the end of any existing
> > > fixed-form lines. I frankly don't think we can fix this without a new
> > > log option or sticking it under --debug.
> > >
> > > For now, please send me just the code that implements a new template
> > > element (and not the modified templates).
> >
> > First thanks for queuing the other ones.
> >
> > OK, OK, not so nice, indeed. I was not expecting this one to go in anyway.
> > I was just seeking some more feedback... Received.
> > So this gave me another idea (also coming from the summary commit line
> > implementation) I'd like to submit to see if there is any interest in the
> > community. Instead of having a simple {closed} keyword, why not having a
> > {changesettype} or equivalent that could return:
> > - head closed
> > - merge: have 2 parents
> > - head: no children
> > - branch head: no children on same branch. Not sure a distinction between
> > head and branch head is needed.
> > - root: no parent
> > - branch root: no parent on same branch
> > - branch merge: parents on a different branch
> > Should it be multi-valued ? "merge, head"
> > Or some should have precedence ? head closed > head > merge > ... > root
> >
> > This could be later an additional "type:" or whatever line, while I don't
> > see {closed} having its own line.
> >
> > Feedback ?
> >
> > Regards.
> > Gilles.
> 
> Complementary concept: hidden text for the HG core:
> ui.write('some text', label='hidden')
> does not print anything.
> 
> When overridden in the color.py extension, this additional output is printed. 
> Alternatively, could be conditional to HGPLAIN.

An interesting notion. But it's important that HGPLAIN not differ in
surprising ways from stock hg output. After all, people are going to run
hg, say "oh, the output looks like this" and tailor their code to match.

Let's start with a) the template element and b) something that prints
with --debug only.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list