Submitter | Durham Goode |
---|---|
Date | March 12, 2013, 5:59 p.m. |
Message ID | <6b748f637490645d2f03.1363111168@dev350.prn1.facebook.com> |
Download | mbox | patch |
Permalink | /patch/1114/ |
State | Superseded, archived |
Headers | show |
Comments
On Tue, Mar 12, 2013 at 10:59:28AM -0700, Durham Goode wrote: > # HG changeset patch > # User Durham Goode <durham@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. This needs a (BC) flag isn't it?
On 3/12/13 10:59 AM, "Durham Goode" <durham@fb.com> wrote: ># HG changeset patch ># User Durham Goode <durham@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@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
Patch
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'):