Patchwork buildrpm: do not break in presence of custom user configs

login
register
mail settings
Submitter via Mercurial-devel
Date Aug. 4, 2017, 1:06 p.m.
Message ID <fb8e45f79078dc1c96b1.1501851999@cuben>
Download mbox | patch
Permalink /patch/22667/
State Accepted
Headers show

Comments

via Mercurial-devel - Aug. 4, 2017, 1:06 p.m.
# HG changeset patch
# User muxator <a.mux@inwind.it>
# Date 1501827310 -7200
#      Fri Aug 04 08:15:10 2017 +0200
# Branch stable
# Node ID fb8e45f79078dc1c96b1f986334f502429380408
# Parent  524b13fc711f76343557f054d2a11678ef83f8c8
buildrpm: do not break in presence of custom user configs

For example, if "hg log" was defined as an alias:

  # /etc/mercurial/hgrc
  [alias]
  log = log --graph

the buildrpm script would be surprised by log messages formatted in
unexpected ways, and bail out.

This patch sets HGPLAIN, effectively resetting all the user configs,
including log output, to a common state, making the build more
predictable across all the possible environments.
Augie Fackler - Aug. 4, 2017, 9:27 p.m.
On Fri, Aug 04, 2017 at 03:06:39PM +0200, a.mux--- via Mercurial-devel wrote:
> # HG changeset patch
> # User muxator <a.mux@inwind.it>
> # Date 1501827310 -7200
> #      Fri Aug 04 08:15:10 2017 +0200
> # Branch stable
> # Node ID fb8e45f79078dc1c96b1f986334f502429380408
> # Parent  524b13fc711f76343557f054d2a11678ef83f8c8
> buildrpm: do not break in presence of custom user configs

queued, thanks

Patch

diff --git a/contrib/buildrpm b/contrib/buildrpm
--- a/contrib/buildrpm
+++ b/contrib/buildrpm
@@ -11,6 +11,8 @@ 
 
 BUILD=1
 RPMBUILDDIR="$PWD/rpmbuild"
+export HGPLAIN=
+
 while [ "$1" ]; do
     case "$1" in
     --prepare )