Patchwork A small enhancement to graphlog to show closed branches

login
register
mail settings
Submitter Henrik Pauli
Date Jan. 25, 2013, 9:21 a.m.
Message ID <51024E92.7020104@gmail.com>
Download mbox | patch
Permalink /patch/732/
State Deferred
Headers show

Comments

Henrik Pauli - Jan. 25, 2013, 9:21 a.m.
I only have 2.4 at the moment, but I hope it fits in the current code as
well.

It shows branch closing commits with a _ character instead of the normal
o character, makes it (in my opinion) easier to see.
Pierre-Yves David - March 12, 2013, 4:23 p.m.
Hi,

the code freeze have been lifted from Feb 1. Considerer sending your patch again

On Fri, Jan 25, 2013 at 10:21:22AM +0100, Henrik Pauli wrote:
> I only have 2.4 at the moment, but I hope it fits in the current code as
> well.
> 
> It shows branch closing commits with a _ character instead of the normal
> o character, makes it (in my opinion) easier to see.

> diff -Naurdp mercurial-2.4/mercurial/cmdutil.py mercurial-2.4-closedbranch/mercurial/cmdutil.py
> --- mercurial-2.4/mercurial/cmdutil.py	2012-11-01 22:09:16.000000000 +0100
> +++ mercurial-2.4-closedbranch/mercurial/cmdutil.py	2013-01-25 10:03:09.436240424 +0100
> @@ -1461,6 +1461,8 @@ def displaygraph(ui, dag, displayer, sho
>              char = '@'
>          elif ctx.obsolete():
>              char = 'x'
> +        elif ctx.closesbranch():
> +            char = '_'
>          copies = None
>          if getrenamed and ctx.rev():
>              copies = []

We currently have:

@ for current working directory parent
x for obsolete changeset
o for normal changeset.

We'll probably need a char for "troubled" changesets too.

I like the idea of having something for closed branch and _ may be a good
candidates.
Steve Borho - March 12, 2013, 7:57 p.m.
On Tue, Mar 12, 2013 at 11:23 AM, Pierre-Yves David <
pierre-yves.david@logilab.fr> wrote:

> Hi,
>
> the code freeze have been lifted from Feb 1. Considerer sending your patch
> again
>
> On Fri, Jan 25, 2013 at 10:21:22AM +0100, Henrik Pauli wrote:
> > I only have 2.4 at the moment, but I hope it fits in the current code as
> > well.
> >
> > It shows branch closing commits with a _ character instead of the normal
> > o character, makes it (in my opinion) easier to see.
>
> > diff -Naurdp mercurial-2.4/mercurial/cmdutil.py
> mercurial-2.4-closedbranch/mercurial/cmdutil.py
> > --- mercurial-2.4/mercurial/cmdutil.py        2012-11-01
> 22:09:16.000000000 +0100
> > +++ mercurial-2.4-closedbranch/mercurial/cmdutil.py   2013-01-25
> 10:03:09.436240424 +0100
> > @@ -1461,6 +1461,8 @@ def displaygraph(ui, dag, displayer, sho
> >              char = '@'
> >          elif ctx.obsolete():
> >              char = 'x'
> > +        elif ctx.closesbranch():
> > +            char = '_'
> >          copies = None
> >          if getrenamed and ctx.rev():
> >              copies = []
>
> We currently have:
>
> @ for current working directory parent
> x for obsolete changeset
> o for normal changeset.
>
> We'll probably need a char for "troubled" changesets too.
>
> I like the idea of having something for closed branch and _ may be a good
> candidates.
>

'_'  jives with how TortoiseHg visualizes branch closing commits, fwiw.
Henrik Pauli - March 14, 2013, 10:01 a.m.
On Tue, Mar 12, 2013 at 8:57 PM, Steve Borho <steve@borho.org> wrote:
>
> On Tue, Mar 12, 2013 at 11:23 AM, Pierre-Yves David
> <pierre-yves.david@logilab.fr> wrote:
>>
>> Hi,
>>
>> the code freeze have been lifted from Feb 1. Considerer sending your patch
>> again

Okay, I'll try to familiarise myself with this patchbomb thing.
Inlining diffs, I always feel the MUAs will just mangle it :/  Will
also look into the other guidelines.  Maybe this weekend, I haven't
had much time to look at it recently.

>>
>> We currently have:
>>
>> @ for current working directory parent
>> x for obsolete changeset
>> o for normal changeset.
>>
>> We'll probably need a char for "troubled" changesets too.

What would a troubled changeset be in the first place?
I don't think I've ever encountered an obsolete changeset either.

>> I like the idea of having something for closed branch and _ may be a good
>> candidates.
>
> '_'  jives with how TortoiseHg visualizes branch closing commits, fwiw.

Yeah, that's where the inspiration came from, pretty much.
Pierre-Yves David - March 20, 2013, 12:42 p.m.
On Thu, Mar 14, 2013 at 11:01:05AM +0100, Henrik Pauli wrote:
> On Tue, Mar 12, 2013 at 8:57 PM, Steve Borho <steve@borho.org> wrote:
> >
> > On Tue, Mar 12, 2013 at 11:23 AM, Pierre-Yves David
> > <pierre-yves.david@logilab.fr> wrote:
> >>
> >> Hi,
> >>
> >> the code freeze have been lifted from Feb 1. Considerer sending your patch
> >> again
> 
> Okay, I'll try to familiarise myself with this patchbomb thing.
> Inlining diffs, I always feel the MUAs will just mangle it :/  Will
> also look into the other guidelines.  Maybe this weekend, I haven't
> had much time to look at it recently.
> 
> >>
> >> We currently have:
> >>
> >> @ for current working directory parent
> >> x for obsolete changeset
> >> o for normal changeset.
> >>
> >> We'll probably need a char for "troubled" changesets too.
> 
> What would a troubled changeset be in the first place?
> I don't think I've ever encountered an obsolete changeset either.

This is part of the new changeset evolution feature. This is still
disabled by default, no wonder you never meet them. We need to keep them
in mind while changing changelog

http://mercurial.selenic.com/wiki/ChangesetEvolution

> >> I like the idea of having something for closed branch and _ may be a good
> >> candidates.
> >
> > '_'  jives with how TortoiseHg visualizes branch closing commits, fwiw.
> 
> Yeah, that's where the inspiration came from, pretty much.

"_" sounds good.
A centered (—) version would be better but that's not ascii anymore.
Maybe "=" as an alternative?

Do you plan to add a visual distinction in hgweb too?
Sean Farley - March 21, 2013, 3:33 a.m.
Pierre-Yves David writes:

[snip]

>> >> We currently have:
>> >>
>> >> @ for current working directory parent
>> >> x for obsolete changeset
>> >> o for normal changeset.
>> >>

[snip]

>> >> I like the idea of having something for closed branch and _ may be a good
>> >> candidates.
>> >
>> > '_'  jives with how TortoiseHg visualizes branch closing commits, fwiw.
>> 
>> Yeah, that's where the inspiration came from, pretty much.
>
> "_" sounds good.
> A centered (—) version would be better but that's not ascii anymore.
> Maybe "=" as an alternative?

What about a simple dash? '-' is still ascii, right?
Henrik Pauli - March 21, 2013, 8:35 a.m.
My reason for not using the dash is that it's often really short in some
mono fonts. = is sort of okay, _ is always nice and wide and it directly
attaches to | (at least on linux, mac terminals have unusually tall line
heights as far as I have seen), but the issue with it is that it's not
vertically centered as a result.
On 21 Mar 2013 04:33, "Sean Farley" <sean.michael.farley@gmail.com> wrote:

>
> Pierre-Yves David writes:
>
> [snip]
>
> >> >> We currently have:
> >> >>
> >> >> @ for current working directory parent
> >> >> x for obsolete changeset
> >> >> o for normal changeset.
> >> >>
>
> [snip]
>
> >> >> I like the idea of having something for closed branch and _ may be a
> good
> >> >> candidates.
> >> >
> >> > '_'  jives with how TortoiseHg visualizes branch closing commits,
> fwiw.
> >>
> >> Yeah, that's where the inspiration came from, pretty much.
> >
> > "_" sounds good.
> > A centered (—) version would be better but that's not ascii anymore.
> > Maybe "=" as an alternative?
>
> What about a simple dash? '-' is still ascii, right?
>
Henrik Pauli - March 21, 2013, 8:40 a.m.
On 20 Mar 2013 13:42, "Pierre-Yves David" <pierre-yves.david@logilab.fr>
wrote:
> Do you plan to add a visual distinction in hgweb too?

I don't personally use hgweb, so I'm not sure, but I could look into that
too.
Didly - March 21, 2013, 9:29 a.m.
On Thu, Mar 21, 2013 at 9:35 AM, Henrik Pauli <henrik.pauli@gmail.com> wrote:
> My reason for not using the dash is that it's often really short in some
> mono fonts. = is sort of okay, _ is always nice and wide and it directly
> attaches to | (at least on linux, mac terminals have unusually tall line
> heights as far as I have seen), but the issue with it is that it's not
> vertically centered as a result.

Personally I don't have any issue with _. In fact I quite like it,
because it is closer to the "|" line that leads to it.

BTW, we usually bottom post in this mailing list.

Cheers,

Angel
Henrik Pauli - March 21, 2013, 9:32 a.m.
On 21/03/13 10:29, Didly wrote:
> On Thu, Mar 21, 2013 at 9:35 AM, Henrik Pauli <henrik.pauli@gmail.com> wrote:
>> My reason for not using the dash is that it's often really short in some
>> mono fonts. = is sort of okay, _ is always nice and wide and it directly
>> attaches to | (at least on linux, mac terminals have unusually tall line
>> heights as far as I have seen), but the issue with it is that it's not
>> vertically centered as a result.
> Personally I don't have any issue with _. In fact I quite like it,
> because it is closer to the "|" line that leads to it.
>
> BTW, we usually bottom post in this mailing list.
>

So do I, usually, except it's really hard to do from my mobile mail 
client. (because Gmail. :))
Pierre-Yves David - March 21, 2013, 10:17 a.m.
On Thu, Mar 21, 2013 at 09:35:21AM +0100, Henrik Pauli wrote:
> > What about a simple dash? '-' is still ascii, right?

It is already used for normal graph rendering.

Patch

diff -Naurdp mercurial-2.4/mercurial/cmdutil.py mercurial-2.4-closedbranch/mercurial/cmdutil.py
--- mercurial-2.4/mercurial/cmdutil.py	2012-11-01 22:09:16.000000000 +0100
+++ mercurial-2.4-closedbranch/mercurial/cmdutil.py	2013-01-25 10:03:09.436240424 +0100
@@ -1461,6 +1461,8 @@  def displaygraph(ui, dag, displayer, sho
             char = '@'
         elif ctx.obsolete():
             char = 'x'
+        elif ctx.closesbranch():
+            char = '_'
         copies = None
         if getrenamed and ctx.rev():
             copies = []