Commit Graph

3 Commits

Author SHA1 Message Date
Wez Furlong
1aecce519b hgext: refactor last-diff code into diffprops.py
Summary:
I want to re-use this elsewhere, so robustify it a bit
and move it to phabricator.diffprops.

Test Plan: run-tests.py, also verified in my www repo.

Reviewers: #sourcecontrol, ttung

Reviewed By: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3230147

Signature: t1:3230147:1463081787:799f232e2ce73395218db3a0fff37dec9a0b02e0
2016-05-12 13:11:08 -07:00
Wez Furlong
a6073a52d4 hgext: simplify arcdiff.py by using differential.getdiffproperties
Summary:
this reduces some of the grovelling around that we're doing
in the full diff structure, and is a smaller amount of data to receive
and process in any case.

Test Plan:
test-diff-since-last-arc-diff.t

```
PYTHONPATH=/data/users/wez/facebook-hg-rpms/fb-hgext /data/users/wez/facebook-hg-rpms/hg-crew/hg --config extensions.publish=/data/users/wez/facebook-hg-rpms/fb-hgext/arcdiff.py --config extensions.errorredirect=! diff --since-last-arc-diff
```

Reviewers: #sourcecontrol, ttung, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3230136

Signature: t1:3230136:1461810350:54cea1026e86ef33b398ee070eb8bbe7a8667ed6
2016-04-28 16:31:51 -07:00
Wez Furlong
1059b7253f Add conduit client
Summary:
I pretty much stole this from our libfb.py.conduit client, but
removed the python 2.7 and 3 specific aspects of it.

This is an HTTP client for conduit, rather than shelling out to arcanist.

I've added a very simple mechanism for replaying conduit results in the
test harness and used this to build out some tests for the `arcdiff.py`
and `phabstatus.py` extensions.

Test Plan:

```
$ ../../hg-crew/tests/run-tests.py -j8
```

In addition to the new tests, manually tested the actual HTTP functionality:

```
$ /data/users/wez/facebook-hg-rpms/hg-crew/hg --config extensions.phabstatus=/data/users/wez/facebook-hg-rpms/fb-hgext/phabstatus.py --config extensions.errorredirect=! ssl
```

Does not error out and shows the diff status.

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3200713
2016-04-27 09:27:56 -07:00