Submitter | Pulkit Goyal |
---|---|
Date | March 26, 2020, 7:36 a.m. |
Message ID | <eedfec1725f230d9d074.1585208214@workspace> |
Download | mbox | patch |
Permalink | /patch/45902/ |
State | Accepted |
Headers | show |
Comments
On Thu, 26 Mar 2020 13:06:54 +0530, Pulkit Goyal wrote: > # HG changeset patch > # User Pulkit Goyal <7895pulkit@gmail.com> > # Date 1585148595 -19800 > # Wed Mar 25 20:33:15 2020 +0530 > # Node ID eedfec1725f230d9d074ffca2d543b119bc18954 > # Parent 71f078cbf9ea839829229a8935a489200d1f8d36 > tests: conditionalize test-phases.t output for chg > > IIUC chg loads the ProgrammingError class which leads to it directly referencing > it in error output. This makes the test pass on chg. Perhaps the exception would be caught at different place and printed differently.
On Thu, Mar 26, 2020 at 5:05 PM Yuya Nishihara <yuya@tcha.org> wrote: > > On Thu, 26 Mar 2020 13:06:54 +0530, Pulkit Goyal wrote: > > # HG changeset patch > > # User Pulkit Goyal <7895pulkit@gmail.com> > > # Date 1585148595 -19800 > > # Wed Mar 25 20:33:15 2020 +0530 > > # Node ID eedfec1725f230d9d074ffca2d543b119bc18954 > > # Parent 71f078cbf9ea839829229a8935a489200d1f8d36 > > tests: conditionalize test-phases.t output for chg > > > > IIUC chg loads the ProgrammingError class which leads to it directly referencing > > it in error output. This makes the test pass on chg. > > Perhaps the exception would be caught at different place and printed > differently. I see. Fun fact: on py3 with chg, this change is not needed.
Patch
diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -896,11 +896,13 @@ Check we deny its usage on older reposit $ hg --config "phases.new-commit=internal" commit -m "my test internal commit" 2>&1 | grep ProgrammingError ** ProgrammingError: this repository does not support the internal phase raise error.ProgrammingError(msg) - mercurial.error.ProgrammingError: this repository does not support the internal phase + mercurial.error.ProgrammingError: this repository does not support the internal phase (no-chg !) + ProgrammingError: this repository does not support the internal phase (chg !) $ hg --config "phases.new-commit=archived" commit -m "my test archived commit" 2>&1 | grep ProgrammingError ** ProgrammingError: this repository does not support the archived phase raise error.ProgrammingError(msg) - mercurial.error.ProgrammingError: this repository does not support the archived phase + mercurial.error.ProgrammingError: this repository does not support the archived phase (no-chg !) + ProgrammingError: this repository does not support the archived phase (chg !) $ cd ..