mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
6c6ebce1f6
Summary: The extension was a quick hack from me to make it easier to locate non-core code when doing extension development. It seems a good idea to add colors in general so it's named "morecolors" with the hope that we can colorize more places in the future. Test Plan: Added a test Reviewers: #mercurial, durham Reviewed By: durham Subscribers: durham, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4884999 Signature: t1:4884999:1492473666:89a6756b231eac4274fa05d489480229146bdab8
33 lines
696 B
Perl
33 lines
696 B
Perl
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> morecolors=$TESTDIR/../hgext3rd/morecolors.py
|
|
> [ui]
|
|
> color=always
|
|
> [color]
|
|
> mode=ansi
|
|
> EOF
|
|
|
|
Traceback has color:
|
|
|
|
$ cat > repocrash.py << EOF
|
|
> from mercurial import error
|
|
> def reposetup(ui, repo):
|
|
> raise error.Abort('.')
|
|
> EOF
|
|
|
|
$ hg init repo1
|
|
$ cd repo1
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
> [extensions]
|
|
> repocrash=$TESTTMP/repocrash.py
|
|
> EOF
|
|
|
|
$ hg commit --traceback 2>&1 | egrep -v '^ '
|
|
Traceback (most recent call last):
|
|
\x1b[0;31;1m File "$TESTTMP/repocrash.py", line 3, in reposetup\x1b[0m (esc)
|
|
\x1b[0;31;1m raise error.Abort('.')\x1b[0m (esc)
|
|
\x1b[0;31;1mAbort: .\x1b[0m (esc)
|
|
abort: .
|
|
|