[PATCH 2 of 8] push: refuse to push obsolete changeset

Angel Ezquerra angel.ezquerra at gmail.com
Fri Jul 6 14:56:48 CDT 2012


On Fri, Jul 6, 2012 at 7:28 PM, Pierre-Yves David
<pierre-yves.david at logilab.fr> wrote:
> On Thu, Jul 05, 2012 at 09:08:03PM -0400, Augie Fackler wrote:
>> > +                        if self.obsstore:
>> > +                            msg = "push includes an obsolete changeset: %s!"
>>
>> Why is this string outlined rather than inside the util.Abort(_(…))?
>
> Because the abort line start with 40 char intendation making it unsuitable for
> adding any text.

Pierre-Yves,

I am not 100% sure, but I think that the i18n tool will not pick up a
string if it you first assign it to a variable (msg in this case) and
then you call _() on it.

Instead, it'd be best to do:

if self.obsstore:
    msg = _("push includes an obsolete changeset: %s!")

And later pass msg to util.Abort().

Cheers,

Angel


More information about the Mercurial-devel mailing list