[PATCH V2] status: add a flag to terse the output (issue4119)

Martin von Zweigbergk martinvonz at google.com
Mon Jun 19 17:44:04 EDT 2017


On Mon, Jun 19, 2017 at 2:39 PM, Pulkit Goyal <7895pulkit at gmail.com> wrote:
> On Tue, Jun 20, 2017 at 2:45 AM, Danek Duvall <danek.duvall at oracle.com> wrote:
>> I'd like to see some text in the help output that talks about -t and its
>> arguments -- what are they, what do they mean, what it means to combine
>> them, how to disable them.
>
> Yeah that will be of great help to the users. Will add in V3 (or a followup).
>
>>> +                if st[0:1] in terse:
>>> +                    show.append(st)
>>
>> Is there a reason you're using [0:1] here instead of simply [0]?
>
> Yes the reason is Python 3 because in that st[0] will return ascii value.
>>>> a = b'abc'
>>>> for i in range(len(a)):
> ...     print(a[i])
> ...
> 97
> 98
> 99

For the sake of correctness, "st[0] in terse" would also have worked,
wouldn't it? st[0] would be a byte, but wouldn't terse be bytes too? I
don't mind using st[0:1] for consistency, though.

>
>
>> I think you need some tests that actually end up tersing a directory that
>> has only modified (or added, or ...) files.
>
> Sure.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list