Commit Graph

7 Commits

Author SHA1 Message Date
Jun Wu
bcd74ba1c5 rage: silence exceptions when reading details
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
2016-02-11 21:00:33 +00:00
Laurent Charignon
b36541de7d cleanup: replace all the calls to util.Abort to error.Abort
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass like before

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2811837
2016-01-07 18:30:24 -08:00
Jun Wu
2c14585429 rage: add --preview option
Summary:
`hg rage` is useful collecting information suitable for error reports.
Currently it is hardcoded to create a new task. This patch adds an
`--preview` option to print the information without creating tasks.

Test Plan:
1. `hg rage --preview` prints expected information
2. Mock `oncalls`, `arc`, `tasks` and confirm `hg rage` works

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Differential Revision: https://phabricator.fb.com/D2716395

Tasks: 9259456

Signature: t1:2716395:1449110560:efa372f5aab0cf2c586339413f4a0ebf27ad9014
2015-12-02 18:44:42 -08:00
Ryan McElroy
f79b8fe28c update rage to work with new bookmarks api 2015-08-03 16:25:42 -07:00
Ryan McElroy
f19c04580a Merge fbonly into default
Summary:
A ton of tests in the 'default' branch are broken, yet they all work in 'fbonly' (because that's what we test and push).

Let's give the world all of our goodness. Bleeding edge is where it's at.

Top of hg sl now looks like:

```
@    386a20  rmcelroy
|\   merge fbonly into default
| |
o |  a284c7  rmcelroy  D1880107  remote/@
| |  githelp: add: mention that record and crecord make commits
| |
| o  f4870a  sid0  remote/fbtip  fbonly
| |  crecord: update to latest default
```

Test Plan: run-tests.py actually works now

Reviewers: davidsp, ericsumner, mitrandir, akushner, durham, sid0

Reviewed By: durham

Subscribers: lcharignon, mpm, ps

Differential Revision: https://phabricator.fb.com/D1883891

Signature: t1:1883891:1425613263:8c199f339596384aa7d089154ef99eb982ecff87
2015-03-08 12:22:25 -07:00
Siddharth Agarwal
e5f8d5d86a fix imports for rage and reset
Summary: https://www.facebook.com/groups/sourcecontrol/permalink/759427877440168/

Test Plan: Ran tests.

Reviewers: davidsp, rmcelroy, akushner, pyd, daviser, durham

Reviewed By: durham

Subscribers: hannesr

Differential Revision: https://phabricator.fb.com/D1737437

Signature: t1:1737437:1418431485:e44008e0cb52ac664f0f6e05822cb5feeba33973
2014-12-12 14:35:47 -08:00
Alecs King
1b5f10e092 hg rage
Summary: add a 'hg rage' to log info and file a task.

Test Plan:
Here's a sample run with task and paste:

[int@dev1158]~/test% hg rage
pasting the rage info:
https://phabricator.fb.com/P17065959
filing the task:
https://our.intern.facebook.com/intern/tasks/?t=5544589

Reviewers: sid0, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1660543

Tasks: 5436255

Signature: t1:1660543:1415220586:9ce4431277ccccc86e98d01ed246e12e297fcfe0
2014-11-03 23:03:09 -08:00