[PATCH] buildrpm: do not break in presence of custom user configs

a.mux at inwind.it a.mux at inwind.it
Fri Aug 4 13:06:39 UTC 2017


# HG changeset patch
# User muxator <a.mux at 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.

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 )


More information about the Mercurial-devel mailing list