Mercurial > hg
comparison tests/test-phabricator.t @ 44579:a7f8c657a3f0
phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Per Augie's request. Like regular revsets, the result is the union of all given
specs. Unlike regular revsets, these don't resolve in parent -> child order,
and should be specified as such on the command line.
This change invalidated a previous test using an empty `hg phabread`, so it has
been switched to `hg debugcallconduit` to preserve that coverage.
Differential Revision: https://phab.mercurial-scm.org/D8233
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 05 Mar 2020 11:02:07 -0500 |
parents | 2ec6160449aa |
children | 38f7b2f02f6d |
comparison
equal
deleted
inserted
replaced
44578:90adda73676a | 44579:a7f8c657a3f0 |
---|---|
27 this test. | 27 this test. |
28 $ hg phabread --config auth.hgphab.phabtoken=cli-notavalidtoken \ | 28 $ hg phabread --config auth.hgphab.phabtoken=cli-notavalidtoken \ |
29 > --test-vcr "$VCR/phabread-conduit-error.json" D4480 | head | 29 > --test-vcr "$VCR/phabread-conduit-error.json" D4480 | head |
30 abort: Conduit Error (ERR-INVALID-AUTH): API token "cli-notavalidtoken" has the wrong length. API tokens should be 32 characters long. | 30 abort: Conduit Error (ERR-INVALID-AUTH): API token "cli-notavalidtoken" has the wrong length. API tokens should be 32 characters long. |
31 | 31 |
32 Missing arguments print the command help | 32 Missing arguments don't crash, and may print the command help |
33 | 33 |
34 $ hg debugcallconduit | |
35 hg debugcallconduit: invalid arguments | |
36 hg debugcallconduit METHOD | |
37 | |
38 call Conduit API | |
39 | |
40 options: | |
41 | |
42 (use 'hg debugcallconduit -h' to show more help) | |
43 [255] | |
34 $ hg phabread | 44 $ hg phabread |
35 hg phabread: invalid arguments | 45 abort: empty DREVSPEC set |
36 hg phabread DREVSPEC [OPTIONS] | |
37 | |
38 print patches from Phabricator suitable for importing | |
39 | |
40 options: | |
41 | |
42 --stack read dependencies | |
43 | |
44 (use 'hg phabread -h' to show more help) | |
45 [255] | 46 [255] |
46 | 47 |
47 Basic phabread: | 48 Basic phabread: |
48 $ hg phabread --test-vcr "$VCR/phabread-4480.json" D4480 | head | 49 $ hg phabread --test-vcr "$VCR/phabread-4480.json" D4480 | head |
49 # HG changeset patch | 50 # HG changeset patch |
54 Wire protocol version 2 will take a substantially different | 55 Wire protocol version 2 will take a substantially different |
55 approach to exchange than version 1 (at least as far as pulling | 56 approach to exchange than version 1 (at least as far as pulling |
56 is concerned). | 57 is concerned). |
57 | 58 |
58 This commit establishes a new exchangev2 module for holding | 59 This commit establishes a new exchangev2 module for holding |
60 | |
61 Phabread with multiple DREVSPEC | |
62 | |
63 TODO: attempt to order related revisions like --stack? | |
64 $ hg phabread --test-vcr "$VCR/phabread-multi-drev.json" D8205 8206 D8207 \ | |
65 > | grep '^Differential Revision' | |
66 Differential Revision: https://phab.mercurial-scm.org/D8205 | |
67 Differential Revision: https://phab.mercurial-scm.org/D8206 | |
68 Differential Revision: https://phab.mercurial-scm.org/D8207 | |
69 | |
70 Empty DREVSPECs don't crash | |
71 | |
72 $ hg phabread --test-vcr "$VCR/phabread-empty-drev.json" D7917-D7917 | |
73 abort: empty DREVSPEC set | |
74 [255] | |
75 | |
59 | 76 |
60 phabupdate with an accept: | 77 phabupdate with an accept: |
61 $ hg phabupdate --accept D4564 \ | 78 $ hg phabupdate --accept D4564 \ |
62 > -m 'I think I like where this is headed. Will read rest of series later.'\ | 79 > -m 'I think I like where this is headed. Will read rest of series later.'\ |
63 > --test-vcr "$VCR/accept-4564.json" | 80 > --test-vcr "$VCR/accept-4564.json" |
368 phase: public | 385 phase: public |
369 user: test | 386 user: test |
370 date: Thu Jan 01 00:00:00 1970 +0000 | 387 date: Thu Jan 01 00:00:00 1970 +0000 |
371 summary: create beta for phabricator test | 388 summary: create beta for phabricator test |
372 | 389 |
390 Phabimport accepts multiple DREVSPECs | |
391 | |
392 $ hg rollback --config ui.rollback=True | |
393 repository tip rolled back to revision 1 (undo phabimport) | |
394 $ hg phabimport --no-stack D7917 D7918 --test-vcr "$VCR/phabimport-multi-drev.json" | |
395 applying patch from D7917 | |
396 applying patch from D7918 | |
373 | 397 |
374 $ cd .. | 398 $ cd .. |