Submitter | Pulkit Goyal |
---|---|
Date | July 23, 2020, 7:21 p.m. |
Message ID | <f5621c1f45bb0f277934.1595532082@workspace> |
Download | mbox | patch |
Permalink | /patch/46853/ |
State | Accepted |
Headers | show |
Comments
looks good to me. On 7/23/20 9:21 PM, Pulkit Goyal wrote: > # HG changeset patch > # User Pulkit Goyal <7895pulkit@gmail.com> > # Date 1595532057 -19800 > # Fri Jul 24 00:50:57 2020 +0530 > # Node ID f5621c1f45bb0f27793406917ac677cb6cacbe42 > # Parent 4ccd5ec565c2baaa1d598b20a7ea14d3c4fd39dc > # EXP-Topic chg-test > tests: glob 'mercurial.error' in test-phases.t > > On python 2 with chg, `mercurial.error` is omitted while printing error. On > other cases it's there in error message. > > I did tried to understand what might be the cause was unable to find one on > quick skim through the code. > > diff --git a/tests/test-phases.t b/tests/test-phases.t > --- a/tests/test-phases.t > +++ b/tests/test-phases.t > @@ -896,13 +896,11 @@ 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 (no-chg !) > - ProgrammingError: this repository does not support the internal phase (chg !) > + *ProgrammingError: this repository does not support the internal phase (glob) > $ 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 (no-chg !) > - ProgrammingError: this repository does not support the archived phase (chg !) > + *ProgrammingError: this repository does not support the archived phase (glob) > > $ cd .. > > > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel >
On Fri, 24 Jul 2020 00:51:22 +0530, Pulkit Goyal wrote: > # HG changeset patch > # User Pulkit Goyal <7895pulkit@gmail.com> > # Date 1595532057 -19800 > # Fri Jul 24 00:50:57 2020 +0530 > # Node ID f5621c1f45bb0f27793406917ac677cb6cacbe42 > # Parent 4ccd5ec565c2baaa1d598b20a7ea14d3c4fd39dc > # EXP-Topic chg-test > tests: glob 'mercurial.error' in test-phases.t Queued, thanks. > On python 2 with chg, `mercurial.error` is omitted while printing error. On > other cases it's there in error message. Maybe the output would be different between the interpreter's traceback printer and traceback.format_exc().
On 2020-07-24 05:17, Yuya Nishihara wrote: > On Fri, 24 Jul 2020 00:51:22 +0530, Pulkit Goyal wrote: >> # HG changeset patch >> # User Pulkit Goyal <7895pulkit@gmail.com> >> # Date 1595532057 -19800 >> # Fri Jul 24 00:50:57 2020 +0530 >> # Node ID f5621c1f45bb0f27793406917ac677cb6cacbe42 >> # Parent 4ccd5ec565c2baaa1d598b20a7ea14d3c4fd39dc >> # EXP-Topic chg-test >> tests: glob 'mercurial.error' in test-phases.t > > Queued, thanks. > >> On python 2 with chg, `mercurial.error` is omitted while printing >> error. On >> other cases it's there in error message. > > Maybe the output would be different between the interpreter's traceback > printer > and traceback.format_exc(). Yes, that’s the reason. Python 3 removed that inconsistency.
Patch
diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -896,13 +896,11 @@ 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 (no-chg !) - ProgrammingError: this repository does not support the internal phase (chg !) + *ProgrammingError: this repository does not support the internal phase (glob) $ 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 (no-chg !) - ProgrammingError: this repository does not support the archived phase (chg !) + *ProgrammingError: this repository does not support the archived phase (glob) $ cd ..