On 08/31/2016 03:57 PM, Akihiko Odaki wrote:
On 2016-08-30 13:19, Matt Mackall wrote:
On Tue, 2016-08-30 at 11:10 +0900, Akihiko Odaki wrote:
Hi,
Thanl you for reviewing my patch.
On 2016-08-30 09:38, Matt Mackall wrote:
> On Sun, 2016-08-28 at 10:57 +0900, Akihiko Odaki wrote:
>> # HG changeset patch
>> # User Akihiko Odaki <akihiko.odaki...@stu.hosei.ac.jp>
>> # Date 1472348629 -32400
>> # Sun Aug 28 10:43:49 2016 +0900
>> # Node ID 3e9c35285720b3eecbda43d3d60e483d63ba7ae4
>> # Parent 4fca69e3d51cc45f331a74caa6e923523ebf7f02
>> bundle2: handleoutput i18n
>
> This would be easier to read as "bundle2: localize handleoutput
remote prompts"
I understand.
>
>> diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
>> --- a/mercurial/bundle2.py
>> +++ b/mercurial/bundle2.py
>> @@ -1467,7 +1467,7 @@ def handlecheckheads(op, inpart):
>> def handleoutput(op, inpart):
>> """forward output captured on the server to the client"""
>> for line in inpart.read().splitlines():
>> - op.ui.status(('remote: %s\n' % line))
>
> You'll note there is an extra level of useless parentheses here. They
actually
> serve a purpose: they stop check-code.py from complaining about not
using _().
>
> So someone didn't put _() there on purpose. Whenever you see
something
> apparently pointless that was also clearly done on purpose, you need
to figure
> out why it was done before you take it out: you might be breaking
something that
> isn't obvious.
I thought it should use _() because other codes do so. Here is `grep -r
'remote: ' mercurial`.
Yes, that does appear right. But did you also check the history of the
file
you're changing to see if there was a reason that someone used () to
silence a
warning rather than just using _() correctly?
Yes, I checked and it was written by Pierre-Yves David, so he is in Cc.
The revision is b7435117d951. Sorry for forgetting to tell that.
I wrote that years ago and I don't remember any details about this
sorry. If there is no trace in the commit history any reason for this is
lost.
Cheers,
--
Pierre-Yves David
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel