[PATCH V3] show: new extension for displaying various repository data

Gregory Szorc gregory.szorc at gmail.com
Mon Apr 3 12:46:02 EDT 2017


On Mon, Apr 3, 2017 at 9:37 AM, Durham Goode <durham at fb.com> wrote:

> On 4/3/17 8:36 AM, Augie Fackler wrote:
>
>> On Mon, Apr 03, 2017 at 08:17:33AM -0700, Gregory Szorc wrote:
>>
>>>
>>>
>>> On Apr 3, 2017, at 08:07, Yuya Nishihara <yuya at tcha.org> wrote:
>>>>
>>>> On Sat, 1 Apr 2017 20:42:10 +0900, Yuya Nishihara wrote:
>>>>>
>>>>>> On Fri, 24 Mar 2017 19:31:20 -0700, Gregory Szorc wrote:
>>>>>> # HG changeset patch
>>>>>> # User Gregory Szorc <gregory.szorc at gmail.com>
>>>>>> # Date 1490408340 25200
>>>>>> #      Fri Mar 24 19:19:00 2017 -0700
>>>>>> # Node ID 42b0afe0f6ebea285569e0061e1eab2fcffb686e
>>>>>> # Parent  aea8ec3f7dd1967a05ecce8f779e16f7ad14fdee
>>>>>> show: new extension for displaying various repository data
>>>>>>
>>>>>
>>>>> Looks good, and there seems no negative comment on this, so I'll queue
>>>>> it
>>>>> tomorrow or next Monday.
>>>>>
>>>>
>>>> Finally pushed this.
>>>>
>>>
>>> \o/
>>>
>>> So, I could use some help adding new views to this. It is experimental
>>> and there is no BC, so I think I can encourage people to experiment :)
>>>
>>> I'd *really* like to get some form of smartlog/wip/underway in show for
>>> 4.2. I've barely started that work. Is anyone willing to work on that? If
>>> not, I can try to hack on something basic.
>>>
>>
>> Durham, do you have anyone that might be interested in getting
>> smartlog-type functionality in core as part of 'hg show'?
>>
>
> There's a couple options here. The simplest V1 would be to have the hg
> show view just be an alias for this:
>
> hg log --config experimental.graphstyle.grandparent='2.' -G -r
> '::(draft() & (date(-14) | ::bookmark())) & draft() + ancestor(draft() &
> (date(-14) | ::bookmark())) + . + present(master) + present(@)'
>
> (in human words:  draft ancestors of your bookmarks and your last 2 weeks
> of unbookmarked drafts, plus the common ancestor of those, plus your
> working copy location, plus master-or-@)
>
> with some fancy template alias (I've provided our '{sl}' template here
> https://bpaste.net/show/72b096bea240). It's not quite fast enough on a
> huge repo, but for everyone else it's probably fine.
>

That's similar to how `hg wip` is implemented. I was also thinking that
initially implementing it in terms of a pre-defined revset + template would
be a good first start.


>
>
> The second option is we could reuse our existing smartlog extension
> implementation.  It results in better output because it's smarter about
> sorting (to avoid line crosses, instead of just outputting in rev order)
> and smarter about figuring out what is 'master' in the repo and about
> efficiently doing the computation (not using revsets in some cases). But
> it's about 500 lines of not-pretty code that we probably wouldn't have time
> to pretty-up.
>

Since there are no BC guarantees for show yet, let's land a revset +
template implementation in 4.2 then iterate with smartlog's features in the
4.3 cycle.

Sound like a plan?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170403/0dd70de6/attachment.html>


More information about the Mercurial-devel mailing list