annotate tests/test-phabricator.t @ 42617:7629eb87e7f2

phabricator: demonstrate broken phabread on string local:commit times Differential Revision: https://phab.mercurial-scm.org/D6649
author Ian Moody <moz-ian@perix.co.uk>
date Tue, 16 Jul 2019 18:38:38 +0100
parents d3c81439e2ee
children c17e6a3e7356
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
1 #require vcr
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
2 $ cat >> $HGRCPATH <<EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
3 > [extensions]
39652
d2c81e83de2a phabricator: move extension from contrib to hgext
Augie Fackler <raf@durin42.com>
parents: 39651
diff changeset
4 > phabricator =
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
5 > EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
6 $ hg init repo
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
7 $ cd repo
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
8 $ cat >> .hg/hgrc <<EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
9 > [phabricator]
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
10 > url = https://phab.mercurial-scm.org/
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
11 > callsign = HG
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
12 >
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
13 > [auth]
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
14 > hgphab.schemes = https
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
15 > hgphab.prefix = phab.mercurial-scm.org
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
16 > # When working on the extension and making phabricator interaction
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
17 > # changes, edit this to be a real phabricator token. When done, edit
42443
d3c81439e2ee phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings
Ian Moody <moz-ian@perix.co.uk>
parents: 42431
diff changeset
18 > # it back. The VCR transcripts will be auto-sanitised to replace your real
d3c81439e2ee phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings
Ian Moody <moz-ian@perix.co.uk>
parents: 42431
diff changeset
19 > # token with this value.
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
20 > hgphab.phabtoken = cli-hahayouwish
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
21 > EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
22 $ VCR="$TESTDIR/phabricator"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
23
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
24 Error is handled reasonably. We override the phabtoken here so that
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
25 when you're developing changes to phabricator.py you can edit the
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
26 above config and have a real token in the test but not have to edit
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
27 this test.
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
28 $ hg phabread --config auth.hgphab.phabtoken=cli-notavalidtoken \
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
29 > --test-vcr "$VCR/phabread-conduit-error.json" D4480 | head
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
30 abort: Conduit Error (ERR-INVALID-AUTH): API token "cli-notavalidtoken" has the wrong length. API tokens should be 32 characters long.
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
31
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
32 Basic phabread:
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
33 $ hg phabread --test-vcr "$VCR/phabread-4480.json" D4480 | head
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
34 # HG changeset patch
42257
a4f7dceb07bf phabricator: fallback to reading metadata from diff for phabread
Ian Moody <moz-ian@perix.co.uk>
parents: 41897
diff changeset
35 # Date 1536771503 0
a4f7dceb07bf phabricator: fallback to reading metadata from diff for phabread
Ian Moody <moz-ian@perix.co.uk>
parents: 41897
diff changeset
36 # Parent a5de21c9e3703f8e8eb064bd7d893ff2f703c66a
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
37 exchangev2: start to implement pull with wire protocol v2
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
38
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
39 Wire protocol version 2 will take a substantially different
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
40 approach to exchange than version 1 (at least as far as pulling
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
41 is concerned).
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
42
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
43 This commit establishes a new exchangev2 module for holding
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
44
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
45 phabupdate with an accept:
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
46 $ hg phabupdate --accept D4564 \
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
47 > -m 'I think I like where this is headed. Will read rest of series later.'\
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
48 > --test-vcr "$VCR/accept-4564.json"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
49
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
50 Create a differential diff:
41897
c340a8ac7ef3 phabricator: convert conduit response JSON unicode to bytes inside callconduit
Ian Moody <moz-ian@perix.co.uk>
parents: 41164
diff changeset
51 $ HGENCODING=utf-8; export HGENCODING
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
52 $ echo alpha > alpha
41897
c340a8ac7ef3 phabricator: convert conduit response JSON unicode to bytes inside callconduit
Ian Moody <moz-ian@perix.co.uk>
parents: 41164
diff changeset
53 $ hg ci --addremove -m 'create alpha for phabricator test €'
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
54 adding alpha
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
55 $ hg phabsend -r . --test-vcr "$VCR/phabsend-create-alpha.json"
42268
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
56 D1190 - created - d386117f30e6: create alpha for phabricator test \xe2\x82\xac (esc)
41897
c340a8ac7ef3 phabricator: convert conduit response JSON unicode to bytes inside callconduit
Ian Moody <moz-ian@perix.co.uk>
parents: 41164
diff changeset
57 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d386117f30e6-24ffe649-phabsend.hg
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
58 $ echo more >> alpha
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
59 $ HGEDITOR=true hg ci --amend
42268
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
60 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a86ed7d85e86-b7a54f3b-amend.hg
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
61 $ echo beta > beta
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
62 $ hg ci --addremove -m 'create beta for phabricator test'
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
63 adding beta
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
64 $ hg phabsend -r ".^::" --test-vcr "$VCR/phabsend-update-alpha-create-beta.json"
42268
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
65 D1190 - updated - d940d39fb603: create alpha for phabricator test \xe2\x82\xac (esc)
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
66 D1191 - created - 4b2486dfc8c7: create beta for phabricator test
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
67 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/4b2486dfc8c7-d90584fa-phabsend.hg
41897
c340a8ac7ef3 phabricator: convert conduit response JSON unicode to bytes inside callconduit
Ian Moody <moz-ian@perix.co.uk>
parents: 41164
diff changeset
68 $ unset HGENCODING
39653
10c53b2e9d52 phabricator: add tests of templatekeyword
Augie Fackler <raf@durin42.com>
parents: 39652
diff changeset
69
41163
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
70 The amend won't explode after posting a public commit. The local tag is left
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
71 behind to identify it.
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
72
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
73 $ echo 'public change' > beta
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
74 $ hg ci -m 'create public change for phabricator testing'
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
75 $ hg phase --public .
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
76 $ echo 'draft change' > alpha
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
77 $ hg ci -m 'create draft change for phabricator testing'
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
78 $ hg phabsend --amend -r '.^::' --test-vcr "$VCR/phabsend-create-public.json"
42268
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
79 D1192 - created - 24ffd6bca53a: create public change for phabricator testing
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
80 D1193 - created - ac331633be79: create draft change for phabricator testing
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
81 warning: not updating public commit 2:24ffd6bca53a
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
82 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ac331633be79-719b961c-phabsend.hg
41163
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
83 $ hg tags -v
42268
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
84 tip 3:a19f1434f9a5
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
85 D1192 2:24ffd6bca53a local
41163
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
86
41017
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
87 $ hg debugcallconduit user.search --test-vcr "$VCR/phab-conduit.json" <<EOF
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
88 > {
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
89 > "constraints": {
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
90 > "isBot": true
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
91 > }
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
92 > }
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
93 > EOF
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
94 {
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
95 "cursor": {
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
96 "after": null,
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
97 "before": null,
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
98 "limit": 100,
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
99 "order": null
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
100 },
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
101 "data": [],
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
102 "maps": {},
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
103 "query": {
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
104 "queryKey": null
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
105 }
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
106 }
d7d3164e6a31 phabricator: properly encode boolean types in the request body
Matt Harbison <matt_harbison@yahoo.com>
parents: 39654
diff changeset
107
39653
10c53b2e9d52 phabricator: add tests of templatekeyword
Augie Fackler <raf@durin42.com>
parents: 39652
diff changeset
108 Template keywords
10c53b2e9d52 phabricator: add tests of templatekeyword
Augie Fackler <raf@durin42.com>
parents: 39652
diff changeset
109 $ hg log -T'{rev} {phabreview|json}\n'
42268
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
110 3 {"id": "D1193", "url": "https://phab.mercurial-scm.org/D1193"}
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
111 2 {"id": "D1192", "url": "https://phab.mercurial-scm.org/D1192"}
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
112 1 {"id": "D1191", "url": "https://phab.mercurial-scm.org/D1191"}
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
113 0 {"id": "D1190", "url": "https://phab.mercurial-scm.org/D1190"}
39653
10c53b2e9d52 phabricator: add tests of templatekeyword
Augie Fackler <raf@durin42.com>
parents: 39652
diff changeset
114
41163
0101a35deae2 phabricator: warn if unable to amend, instead of aborting after posting
Matt Harbison <matt_harbison@yahoo.com>
parents: 41017
diff changeset
115 $ hg log -T'{rev} {if(phabreview, "{phabreview.url} {phabreview.id}")}\n'
42268
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
116 3 https://phab.mercurial-scm.org/D1193 D1193
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
117 2 https://phab.mercurial-scm.org/D1192 D1192
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
118 1 https://phab.mercurial-scm.org/D1191 D1191
af13e2088f77 phabricator: add custom vcr matcher to match request bodies
Ian Moody <moz-ian@perix.co.uk>
parents: 42257
diff changeset
119 0 https://phab.mercurial-scm.org/D1190 D1190
39653
10c53b2e9d52 phabricator: add tests of templatekeyword
Augie Fackler <raf@durin42.com>
parents: 39652
diff changeset
120
42431
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
121 Commenting when phabsending:
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
122 $ echo comment > comment
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
123 $ hg ci --addremove -m "create comment for phabricator test"
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
124 adding comment
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
125 $ hg phabsend -r . -m "For default branch" --test-vcr "$VCR/phabsend-comment-created.json"
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
126 D1253 - created - a7ee4bac036a: create comment for phabricator test
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
127 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a7ee4bac036a-8009b5a0-phabsend.hg
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
128 $ echo comment2 >> comment
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
129 $ hg ci --amend
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
130 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/81fce7de1b7d-05339e5b-amend.hg
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
131 $ hg phabsend -r . -m "Address review comments" --test-vcr "$VCR/phabsend-comment-updated.json"
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
132 D1253 - updated - 1acd4b60af38: create comment for phabricator test
29528c4235a1 phabricator: add commenting to phabsend for new/updated Diffs
Ian Moody <moz-ian@perix.co.uk>
parents: 42268
diff changeset
133
42617
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
134 Phabreading a DREV with a local:commits time as a string:
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
135 BROKEN: shouldn't error
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
136 $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
137 ** unknown exception encountered, please report by visiting
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
138 ** https://mercurial-scm.org/wiki/BugTracker
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
139 ** Python * (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
140 ** Mercurial Distributed SCM (version *) (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
141 ** Extensions loaded: phabricator
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
142 Traceback (most recent call last):
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
143 File "*/install/bin/hg", line *, in <module> (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
144 dispatch.run()
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
145 File "*/install/lib/python/mercurial/dispatch.py", line *, in run (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
146 status = dispatch(req)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
147 File "*/install/lib/python/mercurial/dispatch.py", line *, in dispatch (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
148 ret = _runcatch(req) or 0
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
149 File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatch (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
150 return _callcatch(ui, _runcatchfunc)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
151 File "*/install/lib/python/mercurial/dispatch.py", line *, in _callcatch (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
152 return scmutil.callcatch(ui, func)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
153 File "*/install/lib/python/mercurial/scmutil.py", line *, in callcatch (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
154 return func()
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
155 File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatchfunc (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
156 return _dispatch(req)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
157 File "*/install/lib/python/mercurial/dispatch.py", line *, in _dispatch (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
158 cmdpats, cmdoptions)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
159 File "*/install/lib/python/mercurial/dispatch.py", line *, in runcommand (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
160 ret = _runcommand(ui, options, cmd, d)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
161 File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcommand (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
162 return cmdfunc()
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
163 File "*/install/lib/python/mercurial/dispatch.py", line *, in <lambda> (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
164 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
165 File "*/install/lib/python/mercurial/util.py", line *, in check (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
166 return func(*args, **kwargs)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
167 File "*/install/lib/python/hgext/phabricator.py", line *, in inner (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
168 return fn(*args, **kwargs)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
169 File "*/install/lib/python/hgext/phabricator.py", line *, in phabread (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
170 readpatch(repo, drevs, ui.write)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
171 File "*/install/lib/python/hgext/phabricator.py", line *, in readpatch (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
172 meta = getdiffmeta(diffs[b'%d' % diffid])
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
173 File "*/install/lib/python/hgext/phabricator.py", line *, in getdiffmeta (glob)
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
174 meta[b'date'] = b'%d 0' % commit[b'time']
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
175 TypeError: %d format: a number is required, not str
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
176 [1]
7629eb87e7f2 phabricator: demonstrate broken phabread on string local:commit times
Ian Moody <moz-ian@perix.co.uk>
parents: 42443
diff changeset
177
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
178 $ cd ..