From patchwork Tue Mar 12 17:59:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [V2] tests: change HGPROF environment var to be HG_PROF From: Durham Goode X-Patchwork-Id: 1114 Message-Id: <6b748f637490645d2f03.1363111168@dev350.prn1.facebook.com> To: mercurial-devel@selenic.com Date: Tue, 12 Mar 2013 10:59:28 -0700 # HG changeset patch # User Durham Goode # Date 1363109868 25200 # Tue Mar 12 10:37:48 2013 -0700 # Node ID 6b748f637490645d2f03142e4824739cfc0791b3 # Parent 018d68a30fe19e2d2c73d765306ba3156bb4957c tests: change HGPROF environment var to be HG_PROF The test-profile test would fail if the user had HGPROF set to another profiler in their environment. This change makes HGPROF follow the naming convention HG_... so that it is unset automatically as part of the test runner. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -814,7 +814,7 @@ raise error.CommandError(cmd, _("invalid arguments")) if options['profile']: - profiler = os.getenv('HGPROF') + profiler = os.getenv('HG_PROF') if profiler is None: profiler = ui.config('profiling', 'type', default='ls') if profiler not in ('ls', 'stat'):