[PATCH V2] tests: change HGPROF environment var to be HG_PROF

Durham Goode durham at fb.com
Tue Mar 12 12:59:28 CDT 2013


# HG changeset patch
# User Durham Goode <durham at fb.com>
# 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'):


More information about the Mercurial-devel mailing list