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

Durham Goode durham at fb.com
Tue Mar 12 15:30:22 CDT 2013


On 3/12/13 10:59 AM, "Durham Goode" <durham at fb.com> wrote:

># 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'):
>_______________________________________________
>Mercurial-devel mailing list
>Mercurial-devel at selenic.com
>http://selenic.com/mailman/listinfo/mercurial-devel
>

I talked with Bryan about this, and changing this environment variable
doesn't seem to be the right solution.  I sent another patch that just
addresses HGPROF specifically in run-tests.py

Durham



More information about the Mercurial-devel mailing list