Show More
@@ -0,0 +1,221 b'' | |||
|
1 | { | |
|
2 | "version": 1, | |
|
3 | "interactions": [ | |
|
4 | { | |
|
5 | "request": { | |
|
6 | "body": "api.token=cli-hahayouwish&ids%5B0%5D=1285", | |
|
7 | "headers": { | |
|
8 | "content-length": [ | |
|
9 | "58" | |
|
10 | ], | |
|
11 | "content-type": [ | |
|
12 | "application/x-www-form-urlencoded" | |
|
13 | ], | |
|
14 | "host": [ | |
|
15 | "phab.mercurial-scm.org" | |
|
16 | ], | |
|
17 | "accept": [ | |
|
18 | "application/mercurial-0.1" | |
|
19 | ], | |
|
20 | "user-agent": [ | |
|
21 | "mercurial/proto-1.0 (Mercurial 4.8.2)" | |
|
22 | ] | |
|
23 | }, | |
|
24 | "method": "POST", | |
|
25 | "uri": "https://phab.mercurial-scm.org//api/differential.query" | |
|
26 | }, | |
|
27 | "response": { | |
|
28 | "status": { | |
|
29 | "message": "OK", | |
|
30 | "code": 200 | |
|
31 | }, | |
|
32 | "headers": { | |
|
33 | "content-length": [ | |
|
34 | "822" | |
|
35 | ], | |
|
36 | "expires": [ | |
|
37 | "Sat, 01 Jan 2000 00:00:00 GMT" | |
|
38 | ], | |
|
39 | "x-content-type-options": [ | |
|
40 | "nosniff" | |
|
41 | ], | |
|
42 | "strict-transport-security": [ | |
|
43 | "max-age=31536000; includeSubdomains; preload" | |
|
44 | ], | |
|
45 | "vary": [ | |
|
46 | "Accept-Encoding" | |
|
47 | ], | |
|
48 | "connection": [ | |
|
49 | "keep-alive" | |
|
50 | ], | |
|
51 | "x-xss-protection": [ | |
|
52 | "1; mode=block" | |
|
53 | ], | |
|
54 | "cache-control": [ | |
|
55 | "no-store" | |
|
56 | ], | |
|
57 | "date": [ | |
|
58 | "Mon, 01 Jul 2019 22:36:40 GMT" | |
|
59 | ], | |
|
60 | "x-frame-options": [ | |
|
61 | "Deny" | |
|
62 | ], | |
|
63 | "referrer-policy": [ | |
|
64 | "no-referrer", | |
|
65 | "strict-origin-when-cross-origin" | |
|
66 | ], | |
|
67 | "content-type": [ | |
|
68 | "application/json" | |
|
69 | ] | |
|
70 | }, | |
|
71 | "body": { | |
|
72 | "string": "{\"result\":[{\"id\":\"1285\",\"phid\":\"PHID-DREV-uefuzc6kbhhkoqhr347g\",\"title\":\"test string time\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D1285\",\"dateCreated\":\"1562019861\",\"dateModified\":\"1562019862\",\"authorPHID\":\"PHID-USER-qmzis76vb2yh3ogldu6r\",\"status\":\"0\",\"statusName\":\"Draft\",\"properties\":{\"draft.broadcast\":false,\"lines.added\":1,\"lines.removed\":0,\"buildables\":{\"PHID-HMBB-lhjiovrsqtbft2fz4lua\":{\"status\":\"passed\"}}},\"branch\":null,\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"1\",\"activeDiffPHID\":\"PHID-DIFF-dkgwbpgcv37pymqieyyv\",\"diffs\":[\"2069\"],\"commits\":[],\"reviewers\":[],\"ccs\":[],\"hashes\":[],\"auxiliary\":{\"bugzilla.bug-id\":null,\"phabricator:projects\":[\"PHID-PROJ-f2a3wl5wxtqdtfgdjqzk\"],\"phabricator:depends-on\":[]},\"repositoryPHID\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"sourcePath\":null}],\"error_code\":null,\"error_info\":null}" | |
|
73 | } | |
|
74 | } | |
|
75 | }, | |
|
76 | { | |
|
77 | "request": { | |
|
78 | "body": "api.token=cli-hahayouwish&ids%5B0%5D=2069", | |
|
79 | "headers": { | |
|
80 | "content-length": [ | |
|
81 | "58" | |
|
82 | ], | |
|
83 | "content-type": [ | |
|
84 | "application/x-www-form-urlencoded" | |
|
85 | ], | |
|
86 | "host": [ | |
|
87 | "phab.mercurial-scm.org" | |
|
88 | ], | |
|
89 | "accept": [ | |
|
90 | "application/mercurial-0.1" | |
|
91 | ], | |
|
92 | "user-agent": [ | |
|
93 | "mercurial/proto-1.0 (Mercurial 4.8.2)" | |
|
94 | ] | |
|
95 | }, | |
|
96 | "method": "POST", | |
|
97 | "uri": "https://phab.mercurial-scm.org//api/differential.querydiffs" | |
|
98 | }, | |
|
99 | "response": { | |
|
100 | "status": { | |
|
101 | "message": "OK", | |
|
102 | "code": 200 | |
|
103 | }, | |
|
104 | "headers": { | |
|
105 | "content-length": [ | |
|
106 | "1137" | |
|
107 | ], | |
|
108 | "expires": [ | |
|
109 | "Sat, 01 Jan 2000 00:00:00 GMT" | |
|
110 | ], | |
|
111 | "x-content-type-options": [ | |
|
112 | "nosniff" | |
|
113 | ], | |
|
114 | "strict-transport-security": [ | |
|
115 | "max-age=31536000; includeSubdomains; preload" | |
|
116 | ], | |
|
117 | "vary": [ | |
|
118 | "Accept-Encoding" | |
|
119 | ], | |
|
120 | "connection": [ | |
|
121 | "keep-alive" | |
|
122 | ], | |
|
123 | "x-xss-protection": [ | |
|
124 | "1; mode=block" | |
|
125 | ], | |
|
126 | "cache-control": [ | |
|
127 | "no-store" | |
|
128 | ], | |
|
129 | "date": [ | |
|
130 | "Mon, 01 Jul 2019 22:36:41 GMT" | |
|
131 | ], | |
|
132 | "x-frame-options": [ | |
|
133 | "Deny" | |
|
134 | ], | |
|
135 | "referrer-policy": [ | |
|
136 | "no-referrer", | |
|
137 | "strict-origin-when-cross-origin" | |
|
138 | ], | |
|
139 | "content-type": [ | |
|
140 | "application/json" | |
|
141 | ] | |
|
142 | }, | |
|
143 | "body": { | |
|
144 | "string": "{\"result\":{\"2069\":{\"id\":\"2069\",\"revisionID\":\"1285\",\"dateCreated\":\"1562019858\",\"dateModified\":\"1562019861\",\"sourceControlBaseRevision\":null,\"sourceControlPath\":null,\"sourceControlSystem\":null,\"branch\":null,\"bookmark\":null,\"creationMethod\":\"web\",\"description\":null,\"unitStatus\":\"4\",\"lintStatus\":\"4\",\"changes\":[{\"id\":\"5416\",\"metadata\":{\"line:first\":1,\"hash.effect\":\"ei3Zy6KS2Wut\"},\"oldPath\":null,\"currentPath\":\"test\",\"awayPaths\":[],\"oldProperties\":[],\"newProperties\":{\"unix:filemode\":\"100644\"},\"type\":\"1\",\"fileType\":\"1\",\"commitHash\":null,\"addLines\":\"1\",\"delLines\":\"0\",\"hunks\":[{\"oldOffset\":\"0\",\"newOffset\":\"1\",\"oldLength\":\"0\",\"newLength\":\"1\",\"addLines\":null,\"delLines\":null,\"isMissingOldNewline\":null,\"isMissingNewNewline\":null,\"corpus\":\"+test\\n\"}]}],\"properties\":{\"local:commits\":{\"da5c8c6bf23a36b6e3af011bc3734460692c23ce\":{\"author\":\"test\",\"authorEmail\":\"test\",\"branch\":\"default\",\"commit\":\"da5c8c6bf23a36b6e3af011bc3734460692c23ce\",\"rev\":\"da5c8c6bf23a36b6e3af011bc3734460692c23ce\",\"parents\":[\"1f634396406d03e565ed645370e5fecd062cf215\"],\"time\":\"1562019844\"}}},\"authorName\":\"test\",\"authorEmail\":\"test\"}},\"error_code\":null,\"error_info\":null}" | |
|
145 | } | |
|
146 | } | |
|
147 | }, | |
|
148 | { | |
|
149 | "request": { | |
|
150 | "body": "diffID=2069&api.token=cli-hahayouwish", | |
|
151 | "headers": { | |
|
152 | "content-length": [ | |
|
153 | "54" | |
|
154 | ], | |
|
155 | "content-type": [ | |
|
156 | "application/x-www-form-urlencoded" | |
|
157 | ], | |
|
158 | "host": [ | |
|
159 | "phab.mercurial-scm.org" | |
|
160 | ], | |
|
161 | "accept": [ | |
|
162 | "application/mercurial-0.1" | |
|
163 | ], | |
|
164 | "user-agent": [ | |
|
165 | "mercurial/proto-1.0 (Mercurial 4.8.2)" | |
|
166 | ] | |
|
167 | }, | |
|
168 | "method": "POST", | |
|
169 | "uri": "https://phab.mercurial-scm.org//api/differential.getrawdiff" | |
|
170 | }, | |
|
171 | "response": { | |
|
172 | "status": { | |
|
173 | "message": "OK", | |
|
174 | "code": 200 | |
|
175 | }, | |
|
176 | "headers": { | |
|
177 | "content-length": [ | |
|
178 | "153" | |
|
179 | ], | |
|
180 | "expires": [ | |
|
181 | "Sat, 01 Jan 2000 00:00:00 GMT" | |
|
182 | ], | |
|
183 | "x-content-type-options": [ | |
|
184 | "nosniff" | |
|
185 | ], | |
|
186 | "strict-transport-security": [ | |
|
187 | "max-age=31536000; includeSubdomains; preload" | |
|
188 | ], | |
|
189 | "vary": [ | |
|
190 | "Accept-Encoding" | |
|
191 | ], | |
|
192 | "connection": [ | |
|
193 | "keep-alive" | |
|
194 | ], | |
|
195 | "x-xss-protection": [ | |
|
196 | "1; mode=block" | |
|
197 | ], | |
|
198 | "cache-control": [ | |
|
199 | "no-store" | |
|
200 | ], | |
|
201 | "date": [ | |
|
202 | "Mon, 01 Jul 2019 22:36:42 GMT" | |
|
203 | ], | |
|
204 | "x-frame-options": [ | |
|
205 | "Deny" | |
|
206 | ], | |
|
207 | "referrer-policy": [ | |
|
208 | "no-referrer", | |
|
209 | "strict-origin-when-cross-origin" | |
|
210 | ], | |
|
211 | "content-type": [ | |
|
212 | "application/json" | |
|
213 | ] | |
|
214 | }, | |
|
215 | "body": { | |
|
216 | "string": "{\"result\":\"diff --git a\\/test b\\/test\\nnew file mode 100644\\n--- \\/dev\\/null\\n+++ b\\/test\\n@@ -0,0 +1 @@\\n+test\\n\\n\",\"error_code\":null,\"error_info\":null}" | |
|
217 | } | |
|
218 | } | |
|
219 | } | |
|
220 | ] | |
|
221 | } No newline at end of file |
@@ -131,4 +131,48 b' Commenting when phabsending:' | |||
|
131 | 131 | $ hg phabsend -r . -m "Address review comments" --test-vcr "$VCR/phabsend-comment-updated.json" |
|
132 | 132 | D1253 - updated - 1acd4b60af38: create comment for phabricator test |
|
133 | 133 | |
|
134 | Phabreading a DREV with a local:commits time as a string: | |
|
135 | BROKEN: shouldn't error | |
|
136 | $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285 | |
|
137 | ** unknown exception encountered, please report by visiting | |
|
138 | ** https://mercurial-scm.org/wiki/BugTracker | |
|
139 | ** Python * (glob) | |
|
140 | ** Mercurial Distributed SCM (version *) (glob) | |
|
141 | ** Extensions loaded: phabricator | |
|
142 | Traceback (most recent call last): | |
|
143 | File "*/install/bin/hg", line *, in <module> (glob) | |
|
144 | dispatch.run() | |
|
145 | File "*/install/lib/python/mercurial/dispatch.py", line *, in run (glob) | |
|
146 | status = dispatch(req) | |
|
147 | File "*/install/lib/python/mercurial/dispatch.py", line *, in dispatch (glob) | |
|
148 | ret = _runcatch(req) or 0 | |
|
149 | File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatch (glob) | |
|
150 | return _callcatch(ui, _runcatchfunc) | |
|
151 | File "*/install/lib/python/mercurial/dispatch.py", line *, in _callcatch (glob) | |
|
152 | return scmutil.callcatch(ui, func) | |
|
153 | File "*/install/lib/python/mercurial/scmutil.py", line *, in callcatch (glob) | |
|
154 | return func() | |
|
155 | File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatchfunc (glob) | |
|
156 | return _dispatch(req) | |
|
157 | File "*/install/lib/python/mercurial/dispatch.py", line *, in _dispatch (glob) | |
|
158 | cmdpats, cmdoptions) | |
|
159 | File "*/install/lib/python/mercurial/dispatch.py", line *, in runcommand (glob) | |
|
160 | ret = _runcommand(ui, options, cmd, d) | |
|
161 | File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcommand (glob) | |
|
162 | return cmdfunc() | |
|
163 | File "*/install/lib/python/mercurial/dispatch.py", line *, in <lambda> (glob) | |
|
164 | d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) | |
|
165 | File "*/install/lib/python/mercurial/util.py", line *, in check (glob) | |
|
166 | return func(*args, **kwargs) | |
|
167 | File "*/install/lib/python/hgext/phabricator.py", line *, in inner (glob) | |
|
168 | return fn(*args, **kwargs) | |
|
169 | File "*/install/lib/python/hgext/phabricator.py", line *, in phabread (glob) | |
|
170 | readpatch(repo, drevs, ui.write) | |
|
171 | File "*/install/lib/python/hgext/phabricator.py", line *, in readpatch (glob) | |
|
172 | meta = getdiffmeta(diffs[b'%d' % diffid]) | |
|
173 | File "*/install/lib/python/hgext/phabricator.py", line *, in getdiffmeta (glob) | |
|
174 | meta[b'date'] = b'%d 0' % commit[b'time'] | |
|
175 | TypeError: %d format: a number is required, not str | |
|
176 | [1] | |
|
177 | ||
|
134 | 178 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now