Commit Graph

5 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
7972567aef phabdiff: make phabdiff more URL-agnostic
Summary: We want out phabricator diff parsers to recognize both https://phabricator.intern.facebook.com/ and https://phabricator.fb.com/ URLs (and a bigger class as well).

Test Plan:
- updated some tests (for `phabdiff` and `pullcreatemarkers` other files don't even seem to be used)
- ran tests
- tested phabdiff manually as well:
{F60696023}

Reviewers: #sourcecontrol, andersonmat, mitrandir, simpkins, lcharignon, quark, ttung, ikostia, rmcelroy

Reviewed By: ikostia, rmcelroy

Subscribers: wez, rmcelroy, net-systems-diffs@, mjpieters

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

Tasks: 11013909, 11017978

Signature: t1:3229776:1461839346:08b9b3414e43ff9966bc05591ca5662ef9691aac
2016-04-28 10:55:06 -07:00
Wez Furlong
628f88d82d hgext: refactor D123 parsing, centralize
Summary:
In addition to being duplicated between these places,
I'd like to re-use this elsewhere.

Test Plan: run-tests continues to pass

Reviewers: #sourcecontrol, ttung, ikostia

Reviewed By: ikostia

Subscribers: mjpieters

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

Tasks: 11013909

Signature: t1:3230128:1461775513:6fc79fda68cd15ded7fb11d52024b5aab56ee880
2016-04-27 09:50:13 -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
Wez Furlong
12a08e0a47 add arcconfig accessors
Summary:
This is here to support other arcanist/phabrication integration
modules.

Note: this adds a new package.  I'm not sure what the packaging ramifications
are exactly, but surely there are some as other extensions start to depend on
this.

Test Plan:
integration test is provided:

```
$ ../../hg-crew/tests/run-tests.py -j8
....................................................
# Ran 52 tests, 0 skipped, 0 warned, 0 failed.
```

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

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