Patchwork [STABLE] setup.py: properly discard trust warning

login
register
mail settings
Submitter Isaac Jurado
Date April 2, 2013, 2:08 p.m.
Message ID <6cba58a28560568137b6.1364911690@pepino.omniaccess.com>
Download mbox | patch
Permalink /patch/1239/
State Accepted, archived
Headers show

Comments

Isaac Jurado - April 2, 2013, 2:08 p.m.
# HG changeset patch
# User Isaac Jurado <diptongo@gmail.com>
# Date 1364911390 -7200
# Branch stable
# Node ID 6cba58a28560568137b61a3fb7714c0bb4dc9929
# Parent  801d3db0473ce44d2a37a5bd1b3b340b0a35a2ee
setup.py: properly discard trust warning.

This modification was missing from the fa91ddfc3f36 changeset.
Isaac Jurado - April 2, 2013, 2:11 p.m.
On Tue, Apr 2, 2013 at 4:08 PM, Isaac Jurado <diptongo@gmail.com> wrote:
>
> # HG changeset patch
> # User Isaac Jurado <diptongo@gmail.com>
> # Date 1364911390 -7200
> # Branch stable
> # Node ID 6cba58a28560568137b61a3fb7714c0bb4dc9929
> # Parent  801d3db0473ce44d2a37a5bd1b3b340b0a35a2ee
> setup.py: properly discard trust warning.
>
> This modification was missing from the fa91ddfc3f36 changeset.
>
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -148,7 +148,7 @@
>      # fine, we don't want to load it anyway.  Python may warn about
>      # a missing __init__.py in mercurial/locale, we also ignore that.
>      err = [e for e in err.splitlines()
> -           if not e.startswith(b('Not trusting file')) \
> +           if not e.startswith(b('not trusting file')) \
>                and not e.startswith(b('warning: Not importing')) \
>                and not e.startswith(b('obsolete feature not enabled'))]
>      if err:

This fixes the issue of building as root from a repository owned by a
different user.  Without this change, correct version information is
not generated.

I don't really know if this should go into stable or default.  As it
applies cleanly on both, feel free to make that decision.

Cheers.


--
Isaac Jurado

"The noblest pleasure is the joy of understanding"
Leonardo da Vinci

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -148,7 +148,7 @@ 
     # fine, we don't want to load it anyway.  Python may warn about
     # a missing __init__.py in mercurial/locale, we also ignore that.
     err = [e for e in err.splitlines()
-           if not e.startswith(b('Not trusting file')) \
+           if not e.startswith(b('not trusting file')) \
               and not e.startswith(b('warning: Not importing')) \
               and not e.startswith(b('obsolete feature not enabled'))]
     if err: