mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
bcd74ba1c5
Summary: rage is a basic tool to collect diagnostic information that should not break. To ensure it works all the time, this patch: - unbreaks hg rage from upstream change dad6404ccd - wraps every non-trivial functions with `try`, `catch` - adds a naive test about `hg rage --preview` Test Plan: Run `test-rage.t`. Comment out `import blackbox` and check: ``` hg blackbox -l20: --------------------------- (Failed. See footnote [1]) [1]: global name 'blackbox' is not defined Traceback (most recent call last): File "/home/quark/fb-hgext/rage.py", line 22, in _failsafe return func() File "/home/quark/fb-hgext/rage.py", line 97, in <lambda> _failsafe(lambda: hgcmd(blackbox.blackbox, limit=20))), NameError: global name 'blackbox' is not defined ``` Reviewers: #sourcecontrol, wez, ttung, durham Reviewed By: durham Subscribers: durham, wez, mjpieters Differential Revision: https://phabricator.fb.com/D2928778 Tasks: 10028490 Signature: t1:2928778:1455240651:d39ceed5d045e279160690e0a93a4e326d307db3
10 lines
166 B
Perl
10 lines
166 B
Perl
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> rage=$TESTDIR/../rage.py
|
|
> EOF
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ hg rage --preview | grep -o 'blackbox'
|
|
blackbox
|