##// END OF EJS Templates
phabricator: add commenting to phabsend for new/updated Diffs...
Ian Moody -
r42624:29528c42 default
parent child Browse files
Show More
This diff has been collapsed as it changes many lines, (653 lines changed) Show them Hide them
@@ -0,0 +1,653 b''
1 {
2 "version": 1,
3 "interactions": [
4 {
5 "response": {
6 "status": {
7 "message": "OK",
8 "code": 200
9 },
10 "body": {
11 "string": "{\"result\":{\"data\":[{\"id\":12,\"type\":\"REPO\",\"phid\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"fields\":{\"name\":\"Mercurial\",\"vcs\":\"hg\",\"callsign\":\"HG\",\"shortName\":\"Mercurial\",\"status\":\"active\",\"isImporting\":false,\"almanacServicePHID\":null,\"refRules\":{\"fetchRules\":[],\"trackRules\":[],\"permanentRefRules\":[]},\"spacePHID\":null,\"dateCreated\":1523292927,\"dateModified\":1523297359,\"policy\":{\"view\":\"public\",\"edit\":\"admin\",\"diffusion.push\":\"users\"}},\"attachments\":{}}],\"maps\":{},\"query\":{\"queryKey\":null},\"cursor\":{\"limit\":100,\"after\":null,\"before\":null,\"order\":null}},\"error_code\":null,\"error_info\":null}"
12 },
13 "headers": {
14 "date": [
15 "Fri, 07 Jun 2019 20:23:04 GMT"
16 ],
17 "expires": [
18 "Sat, 01 Jan 2000 00:00:00 GMT"
19 ],
20 "x-content-type-options": [
21 "nosniff"
22 ],
23 "vary": [
24 "Accept-Encoding"
25 ],
26 "cache-control": [
27 "no-store"
28 ],
29 "content-length": [
30 "587"
31 ],
32 "connection": [
33 "keep-alive"
34 ],
35 "content-type": [
36 "application/json"
37 ],
38 "referrer-policy": [
39 "no-referrer",
40 "strict-origin-when-cross-origin"
41 ],
42 "x-frame-options": [
43 "Deny"
44 ],
45 "x-xss-protection": [
46 "1; mode=block"
47 ],
48 "strict-transport-security": [
49 "max-age=31536000; includeSubdomains; preload"
50 ]
51 }
52 },
53 "request": {
54 "method": "POST",
55 "uri": "https://phab.mercurial-scm.org//api/diffusion.repository.search",
56 "body": "constraints%5Bcallsigns%5D%5B0%5D=HG&api.token=cli-hahayouwish",
57 "headers": {
58 "accept": [
59 "application/mercurial-0.1"
60 ],
61 "content-type": [
62 "application/x-www-form-urlencoded"
63 ],
64 "host": [
65 "phab.mercurial-scm.org"
66 ],
67 "content-length": [
68 "81"
69 ],
70 "user-agent": [
71 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
72 ]
73 }
74 }
75 },
76 {
77 "response": {
78 "status": {
79 "message": "OK",
80 "code": 200
81 },
82 "body": {
83 "string": "{\"result\":{\"id\":1989,\"phid\":\"PHID-DIFF-3mtjdk4tjjkaw4arccah\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/differential\\/diff\\/1989\\/\"},\"error_code\":null,\"error_info\":null}"
84 },
85 "headers": {
86 "date": [
87 "Fri, 07 Jun 2019 20:23:05 GMT"
88 ],
89 "expires": [
90 "Sat, 01 Jan 2000 00:00:00 GMT"
91 ],
92 "x-content-type-options": [
93 "nosniff"
94 ],
95 "vary": [
96 "Accept-Encoding"
97 ],
98 "cache-control": [
99 "no-store"
100 ],
101 "content-length": [
102 "172"
103 ],
104 "connection": [
105 "keep-alive"
106 ],
107 "content-type": [
108 "application/json"
109 ],
110 "referrer-policy": [
111 "no-referrer",
112 "strict-origin-when-cross-origin"
113 ],
114 "x-frame-options": [
115 "Deny"
116 ],
117 "x-xss-protection": [
118 "1; mode=block"
119 ],
120 "strict-transport-security": [
121 "max-age=31536000; includeSubdomains; preload"
122 ]
123 }
124 },
125 "request": {
126 "method": "POST",
127 "uri": "https://phab.mercurial-scm.org//api/differential.createrawdiff",
128 "body": "repositoryPHID=PHID-REPO-bvunnehri4u2isyr7bc3&diff=diff+--git+a%2Fcomment+b%2Fcomment%0Anew+file+mode+100644%0A---+%2Fdev%2Fnull%0A%2B%2B%2B+b%2Fcomment%0A%40%40+-0%2C0+%2B1%2C1+%40%40%0A%2Bcomment%0A&api.token=cli-hahayouwish",
129 "headers": {
130 "accept": [
131 "application/mercurial-0.1"
132 ],
133 "content-type": [
134 "application/x-www-form-urlencoded"
135 ],
136 "host": [
137 "phab.mercurial-scm.org"
138 ],
139 "content-length": [
140 "243"
141 ],
142 "user-agent": [
143 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
144 ]
145 }
146 }
147 },
148 {
149 "response": {
150 "status": {
151 "message": "OK",
152 "code": 200
153 },
154 "body": {
155 "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}"
156 },
157 "headers": {
158 "date": [
159 "Fri, 07 Jun 2019 20:23:06 GMT"
160 ],
161 "expires": [
162 "Sat, 01 Jan 2000 00:00:00 GMT"
163 ],
164 "x-content-type-options": [
165 "nosniff"
166 ],
167 "vary": [
168 "Accept-Encoding"
169 ],
170 "cache-control": [
171 "no-store"
172 ],
173 "content-length": [
174 "51"
175 ],
176 "connection": [
177 "keep-alive"
178 ],
179 "content-type": [
180 "application/json"
181 ],
182 "referrer-policy": [
183 "no-referrer",
184 "strict-origin-when-cross-origin"
185 ],
186 "x-frame-options": [
187 "Deny"
188 ],
189 "x-xss-protection": [
190 "1; mode=block"
191 ],
192 "strict-transport-security": [
193 "max-age=31536000; includeSubdomains; preload"
194 ]
195 }
196 },
197 "request": {
198 "method": "POST",
199 "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty",
200 "body": "api.token=cli-hahayouwish&data=%7B%22branch%22%3A+%22default%22%2C+%22date%22%3A+%220+0%22%2C+%22node%22%3A+%22a7ee4bac036ae424bfc9e1a4228c4fa06d637f53%22%2C+%22parent%22%3A+%22a19f1434f9a578325eb9799c9961b5465d4e6e40%22%2C+%22user%22%3A+%22test%22%7D&name=hg%3Ameta&diff_id=1989",
201 "headers": {
202 "accept": [
203 "application/mercurial-0.1"
204 ],
205 "content-type": [
206 "application/x-www-form-urlencoded"
207 ],
208 "host": [
209 "phab.mercurial-scm.org"
210 ],
211 "content-length": [
212 "296"
213 ],
214 "user-agent": [
215 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
216 ]
217 }
218 }
219 },
220 {
221 "response": {
222 "status": {
223 "message": "OK",
224 "code": 200
225 },
226 "body": {
227 "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}"
228 },
229 "headers": {
230 "date": [
231 "Fri, 07 Jun 2019 20:23:07 GMT"
232 ],
233 "expires": [
234 "Sat, 01 Jan 2000 00:00:00 GMT"
235 ],
236 "x-content-type-options": [
237 "nosniff"
238 ],
239 "vary": [
240 "Accept-Encoding"
241 ],
242 "cache-control": [
243 "no-store"
244 ],
245 "content-length": [
246 "51"
247 ],
248 "connection": [
249 "keep-alive"
250 ],
251 "content-type": [
252 "application/json"
253 ],
254 "referrer-policy": [
255 "no-referrer",
256 "strict-origin-when-cross-origin"
257 ],
258 "x-frame-options": [
259 "Deny"
260 ],
261 "x-xss-protection": [
262 "1; mode=block"
263 ],
264 "strict-transport-security": [
265 "max-age=31536000; includeSubdomains; preload"
266 ]
267 }
268 },
269 "request": {
270 "method": "POST",
271 "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty",
272 "body": "api.token=cli-hahayouwish&data=%7B%22a7ee4bac036ae424bfc9e1a4228c4fa06d637f53%22%3A+%7B%22author%22%3A+%22test%22%2C+%22authorEmail%22%3A+%22test%22%2C+%22branch%22%3A+%22default%22%2C+%22commit%22%3A+%22a7ee4bac036ae424bfc9e1a4228c4fa06d637f53%22%2C+%22parents%22%3A+%5B%22a19f1434f9a578325eb9799c9961b5465d4e6e40%22%5D%2C+%22time%22%3A+0%7D%7D&name=local%3Acommits&diff_id=1989",
273 "headers": {
274 "accept": [
275 "application/mercurial-0.1"
276 ],
277 "content-type": [
278 "application/x-www-form-urlencoded"
279 ],
280 "host": [
281 "phab.mercurial-scm.org"
282 ],
283 "content-length": [
284 "396"
285 ],
286 "user-agent": [
287 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
288 ]
289 }
290 }
291 },
292 {
293 "response": {
294 "status": {
295 "message": "OK",
296 "code": 200
297 },
298 "body": {
299 "string": "{\"result\":{\"errors\":[],\"fields\":{\"title\":\"create comment for phabricator test\"},\"revisionIDFieldInfo\":{\"value\":null,\"validDomain\":\"https:\\/\\/phab.mercurial-scm.org\"},\"transactions\":[{\"type\":\"title\",\"value\":\"create comment for phabricator test\"}]},\"error_code\":null,\"error_info\":null}"
300 },
301 "headers": {
302 "date": [
303 "Fri, 07 Jun 2019 20:23:07 GMT"
304 ],
305 "expires": [
306 "Sat, 01 Jan 2000 00:00:00 GMT"
307 ],
308 "x-content-type-options": [
309 "nosniff"
310 ],
311 "vary": [
312 "Accept-Encoding"
313 ],
314 "cache-control": [
315 "no-store"
316 ],
317 "content-length": [
318 "288"
319 ],
320 "connection": [
321 "keep-alive"
322 ],
323 "content-type": [
324 "application/json"
325 ],
326 "referrer-policy": [
327 "no-referrer",
328 "strict-origin-when-cross-origin"
329 ],
330 "x-frame-options": [
331 "Deny"
332 ],
333 "x-xss-protection": [
334 "1; mode=block"
335 ],
336 "strict-transport-security": [
337 "max-age=31536000; includeSubdomains; preload"
338 ]
339 }
340 },
341 "request": {
342 "method": "POST",
343 "uri": "https://phab.mercurial-scm.org//api/differential.parsecommitmessage",
344 "body": "corpus=create+comment+for+phabricator+test&api.token=cli-hahayouwish",
345 "headers": {
346 "accept": [
347 "application/mercurial-0.1"
348 ],
349 "content-type": [
350 "application/x-www-form-urlencoded"
351 ],
352 "host": [
353 "phab.mercurial-scm.org"
354 ],
355 "content-length": [
356 "85"
357 ],
358 "user-agent": [
359 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
360 ]
361 }
362 }
363 },
364 {
365 "response": {
366 "status": {
367 "message": "OK",
368 "code": 200
369 },
370 "body": {
371 "string": "{\"result\":{\"object\":{\"id\":1253,\"phid\":\"PHID-DREV-4rhqd6v3yxbtodc7wbv7\"},\"transactions\":[{\"phid\":\"PHID-XACT-DREV-g73sutb5nezcyh6\"},{\"phid\":\"PHID-XACT-DREV-yg6ysul7pcxtqce\"},{\"phid\":\"PHID-XACT-DREV-vxhpgk64u3kax45\"},{\"phid\":\"PHID-XACT-DREV-mkt5rq3racrpzhe\"},{\"phid\":\"PHID-XACT-DREV-s7la723tgqhwovt\"}]},\"error_code\":null,\"error_info\":null}"
372 },
373 "headers": {
374 "date": [
375 "Fri, 07 Jun 2019 20:23:08 GMT"
376 ],
377 "expires": [
378 "Sat, 01 Jan 2000 00:00:00 GMT"
379 ],
380 "x-content-type-options": [
381 "nosniff"
382 ],
383 "vary": [
384 "Accept-Encoding"
385 ],
386 "cache-control": [
387 "no-store"
388 ],
389 "content-length": [
390 "336"
391 ],
392 "connection": [
393 "keep-alive"
394 ],
395 "content-type": [
396 "application/json"
397 ],
398 "referrer-policy": [
399 "no-referrer",
400 "strict-origin-when-cross-origin"
401 ],
402 "x-frame-options": [
403 "Deny"
404 ],
405 "x-xss-protection": [
406 "1; mode=block"
407 ],
408 "strict-transport-security": [
409 "max-age=31536000; includeSubdomains; preload"
410 ]
411 }
412 },
413 "request": {
414 "method": "POST",
415 "uri": "https://phab.mercurial-scm.org//api/differential.revision.edit",
416 "body": "transactions%5B0%5D%5Bvalue%5D=PHID-DIFF-3mtjdk4tjjkaw4arccah&transactions%5B0%5D%5Btype%5D=update&transactions%5B1%5D%5Bvalue%5D=For+default+branch&transactions%5B1%5D%5Btype%5D=comment&transactions%5B2%5D%5Bvalue%5D=create+comment+for+phabricator+test&transactions%5B2%5D%5Btype%5D=title&api.token=cli-hahayouwish",
417 "headers": {
418 "accept": [
419 "application/mercurial-0.1"
420 ],
421 "content-type": [
422 "application/x-www-form-urlencoded"
423 ],
424 "host": [
425 "phab.mercurial-scm.org"
426 ],
427 "content-length": [
428 "332"
429 ],
430 "user-agent": [
431 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
432 ]
433 }
434 }
435 },
436 {
437 "response": {
438 "status": {
439 "message": "OK",
440 "code": 200
441 },
442 "body": {
443 "string": "{\"result\":[{\"id\":\"1253\",\"phid\":\"PHID-DREV-4rhqd6v3yxbtodc7wbv7\",\"title\":\"create comment for phabricator test\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D1253\",\"dateCreated\":\"1559938988\",\"dateModified\":\"1559938988\",\"authorPHID\":\"PHID-USER-qmzis76vb2yh3ogldu6r\",\"status\":\"0\",\"statusName\":\"Draft\",\"properties\":{\"draft.broadcast\":false,\"lines.added\":1,\"lines.removed\":0},\"branch\":null,\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"1\",\"activeDiffPHID\":\"PHID-DIFF-3mtjdk4tjjkaw4arccah\",\"diffs\":[\"1989\"],\"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}"
444 },
445 "headers": {
446 "date": [
447 "Fri, 07 Jun 2019 20:23:09 GMT"
448 ],
449 "expires": [
450 "Sat, 01 Jan 2000 00:00:00 GMT"
451 ],
452 "x-content-type-options": [
453 "nosniff"
454 ],
455 "vary": [
456 "Accept-Encoding"
457 ],
458 "cache-control": [
459 "no-store"
460 ],
461 "content-length": [
462 "773"
463 ],
464 "connection": [
465 "keep-alive"
466 ],
467 "content-type": [
468 "application/json"
469 ],
470 "referrer-policy": [
471 "no-referrer",
472 "strict-origin-when-cross-origin"
473 ],
474 "x-frame-options": [
475 "Deny"
476 ],
477 "x-xss-protection": [
478 "1; mode=block"
479 ],
480 "strict-transport-security": [
481 "max-age=31536000; includeSubdomains; preload"
482 ]
483 }
484 },
485 "request": {
486 "method": "POST",
487 "uri": "https://phab.mercurial-scm.org//api/differential.query",
488 "body": "api.token=cli-hahayouwish&ids%5B0%5D=1253",
489 "headers": {
490 "accept": [
491 "application/mercurial-0.1"
492 ],
493 "content-type": [
494 "application/x-www-form-urlencoded"
495 ],
496 "host": [
497 "phab.mercurial-scm.org"
498 ],
499 "content-length": [
500 "58"
501 ],
502 "user-agent": [
503 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
504 ]
505 }
506 }
507 },
508 {
509 "response": {
510 "status": {
511 "message": "OK",
512 "code": 200
513 },
514 "body": {
515 "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}"
516 },
517 "headers": {
518 "date": [
519 "Fri, 07 Jun 2019 20:23:10 GMT"
520 ],
521 "expires": [
522 "Sat, 01 Jan 2000 00:00:00 GMT"
523 ],
524 "x-content-type-options": [
525 "nosniff"
526 ],
527 "vary": [
528 "Accept-Encoding"
529 ],
530 "cache-control": [
531 "no-store"
532 ],
533 "content-length": [
534 "51"
535 ],
536 "connection": [
537 "keep-alive"
538 ],
539 "content-type": [
540 "application/json"
541 ],
542 "referrer-policy": [
543 "no-referrer",
544 "strict-origin-when-cross-origin"
545 ],
546 "x-frame-options": [
547 "Deny"
548 ],
549 "x-xss-protection": [
550 "1; mode=block"
551 ],
552 "strict-transport-security": [
553 "max-age=31536000; includeSubdomains; preload"
554 ]
555 }
556 },
557 "request": {
558 "method": "POST",
559 "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty",
560 "body": "api.token=cli-hahayouwish&data=%7B%22branch%22%3A+%22default%22%2C+%22date%22%3A+%220+0%22%2C+%22node%22%3A+%2281fce7de1b7d8ea6b8309a58058d3b5793506c34%22%2C+%22parent%22%3A+%22a19f1434f9a578325eb9799c9961b5465d4e6e40%22%2C+%22user%22%3A+%22test%22%7D&name=hg%3Ameta&diff_id=1989",
561 "headers": {
562 "accept": [
563 "application/mercurial-0.1"
564 ],
565 "content-type": [
566 "application/x-www-form-urlencoded"
567 ],
568 "host": [
569 "phab.mercurial-scm.org"
570 ],
571 "content-length": [
572 "296"
573 ],
574 "user-agent": [
575 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
576 ]
577 }
578 }
579 },
580 {
581 "response": {
582 "status": {
583 "message": "OK",
584 "code": 200
585 },
586 "body": {
587 "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}"
588 },
589 "headers": {
590 "date": [
591 "Fri, 07 Jun 2019 20:23:10 GMT"
592 ],
593 "expires": [
594 "Sat, 01 Jan 2000 00:00:00 GMT"
595 ],
596 "x-content-type-options": [
597 "nosniff"
598 ],
599 "vary": [
600 "Accept-Encoding"
601 ],
602 "cache-control": [
603 "no-store"
604 ],
605 "content-length": [
606 "51"
607 ],
608 "connection": [
609 "keep-alive"
610 ],
611 "content-type": [
612 "application/json"
613 ],
614 "referrer-policy": [
615 "no-referrer",
616 "strict-origin-when-cross-origin"
617 ],
618 "x-frame-options": [
619 "Deny"
620 ],
621 "x-xss-protection": [
622 "1; mode=block"
623 ],
624 "strict-transport-security": [
625 "max-age=31536000; includeSubdomains; preload"
626 ]
627 }
628 },
629 "request": {
630 "method": "POST",
631 "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty",
632 "body": "api.token=cli-hahayouwish&data=%7B%2281fce7de1b7d8ea6b8309a58058d3b5793506c34%22%3A+%7B%22author%22%3A+%22test%22%2C+%22authorEmail%22%3A+%22test%22%2C+%22branch%22%3A+%22default%22%2C+%22commit%22%3A+%2281fce7de1b7d8ea6b8309a58058d3b5793506c34%22%2C+%22parents%22%3A+%5B%22a19f1434f9a578325eb9799c9961b5465d4e6e40%22%5D%2C+%22time%22%3A+0%7D%7D&name=local%3Acommits&diff_id=1989",
633 "headers": {
634 "accept": [
635 "application/mercurial-0.1"
636 ],
637 "content-type": [
638 "application/x-www-form-urlencoded"
639 ],
640 "host": [
641 "phab.mercurial-scm.org"
642 ],
643 "content-length": [
644 "396"
645 ],
646 "user-agent": [
647 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
648 ]
649 }
650 }
651 }
652 ]
653 } No newline at end of file
This diff has been collapsed as it changes many lines, (581 lines changed) Show them Hide them
@@ -0,0 +1,581 b''
1 {
2 "interactions": [
3 {
4 "request": {
5 "method": "POST",
6 "body": "api.token=cli-hahayouwish&revisionIDs%5B0%5D=1253",
7 "uri": "https://phab.mercurial-scm.org//api/differential.querydiffs",
8 "headers": {
9 "content-type": [
10 "application/x-www-form-urlencoded"
11 ],
12 "accept": [
13 "application/mercurial-0.1"
14 ],
15 "user-agent": [
16 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
17 ],
18 "host": [
19 "phab.mercurial-scm.org"
20 ],
21 "content-length": [
22 "66"
23 ]
24 }
25 },
26 "response": {
27 "status": {
28 "code": 200,
29 "message": "OK"
30 },
31 "body": {
32 "string": "{\"result\":{\"1989\":{\"id\":\"1989\",\"revisionID\":\"1253\",\"dateCreated\":\"1559938985\",\"dateModified\":\"1559938988\",\"sourceControlBaseRevision\":null,\"sourceControlPath\":null,\"sourceControlSystem\":null,\"branch\":null,\"bookmark\":null,\"creationMethod\":\"web\",\"description\":null,\"unitStatus\":\"4\",\"lintStatus\":\"4\",\"changes\":[{\"id\":\"5273\",\"metadata\":{\"line:first\":1,\"hash.effect\":\"mzg_LBhhVYqb\"},\"oldPath\":null,\"currentPath\":\"comment\",\"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\":\"+comment\\n\"}]}],\"properties\":{\"hg:meta\":{\"branch\":\"default\",\"date\":\"0 0\",\"node\":\"0025df7d064f9c916862d19e207429a0f799fa7d\",\"parent\":\"a19f1434f9a578325eb9799c9961b5465d4e6e40\",\"user\":\"test\"},\"local:commits\":{\"0025df7d064f9c916862d19e207429a0f799fa7d\":{\"author\":\"test\",\"authorEmail\":\"test\",\"branch\":\"default\",\"commit\":\"0025df7d064f9c916862d19e207429a0f799fa7d\",\"parents\":[\"a19f1434f9a578325eb9799c9961b5465d4e6e40\"],\"time\":0}}},\"authorName\":\"test\",\"authorEmail\":\"test\"}},\"error_code\":null,\"error_info\":null}"
33 },
34 "headers": {
35 "expires": [
36 "Sat, 01 Jan 2000 00:00:00 GMT"
37 ],
38 "content-type": [
39 "application/json"
40 ],
41 "connection": [
42 "keep-alive"
43 ],
44 "vary": [
45 "Accept-Encoding"
46 ],
47 "x-frame-options": [
48 "Deny"
49 ],
50 "strict-transport-security": [
51 "max-age=31536000; includeSubdomains; preload"
52 ],
53 "date": [
54 "Fri, 07 Jun 2019 20:26:57 GMT"
55 ],
56 "cache-control": [
57 "no-store"
58 ],
59 "referrer-policy": [
60 "no-referrer",
61 "strict-origin-when-cross-origin"
62 ],
63 "x-content-type-options": [
64 "nosniff"
65 ],
66 "content-length": [
67 "1243"
68 ],
69 "x-xss-protection": [
70 "1; mode=block"
71 ]
72 }
73 }
74 },
75 {
76 "request": {
77 "method": "POST",
78 "body": "constraints%5Bcallsigns%5D%5B0%5D=HG&api.token=cli-hahayouwish",
79 "uri": "https://phab.mercurial-scm.org//api/diffusion.repository.search",
80 "headers": {
81 "content-type": [
82 "application/x-www-form-urlencoded"
83 ],
84 "accept": [
85 "application/mercurial-0.1"
86 ],
87 "user-agent": [
88 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
89 ],
90 "host": [
91 "phab.mercurial-scm.org"
92 ],
93 "content-length": [
94 "81"
95 ]
96 }
97 },
98 "response": {
99 "status": {
100 "code": 200,
101 "message": "OK"
102 },
103 "body": {
104 "string": "{\"result\":{\"data\":[{\"id\":12,\"type\":\"REPO\",\"phid\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"fields\":{\"name\":\"Mercurial\",\"vcs\":\"hg\",\"callsign\":\"HG\",\"shortName\":\"Mercurial\",\"status\":\"active\",\"isImporting\":false,\"almanacServicePHID\":null,\"refRules\":{\"fetchRules\":[],\"trackRules\":[],\"permanentRefRules\":[]},\"spacePHID\":null,\"dateCreated\":1523292927,\"dateModified\":1523297359,\"policy\":{\"view\":\"public\",\"edit\":\"admin\",\"diffusion.push\":\"users\"}},\"attachments\":{}}],\"maps\":{},\"query\":{\"queryKey\":null},\"cursor\":{\"limit\":100,\"after\":null,\"before\":null,\"order\":null}},\"error_code\":null,\"error_info\":null}"
105 },
106 "headers": {
107 "expires": [
108 "Sat, 01 Jan 2000 00:00:00 GMT"
109 ],
110 "content-type": [
111 "application/json"
112 ],
113 "connection": [
114 "keep-alive"
115 ],
116 "vary": [
117 "Accept-Encoding"
118 ],
119 "x-frame-options": [
120 "Deny"
121 ],
122 "strict-transport-security": [
123 "max-age=31536000; includeSubdomains; preload"
124 ],
125 "date": [
126 "Fri, 07 Jun 2019 20:26:58 GMT"
127 ],
128 "cache-control": [
129 "no-store"
130 ],
131 "referrer-policy": [
132 "no-referrer",
133 "strict-origin-when-cross-origin"
134 ],
135 "x-content-type-options": [
136 "nosniff"
137 ],
138 "content-length": [
139 "587"
140 ],
141 "x-xss-protection": [
142 "1; mode=block"
143 ]
144 }
145 }
146 },
147 {
148 "request": {
149 "method": "POST",
150 "body": "repositoryPHID=PHID-REPO-bvunnehri4u2isyr7bc3&api.token=cli-hahayouwish&diff=diff+--git+a%2Fcomment+b%2Fcomment%0Anew+file+mode+100644%0A---+%2Fdev%2Fnull%0A%2B%2B%2B+b%2Fcomment%0A%40%40+-0%2C0+%2B1%2C2+%40%40%0A%2Bcomment%0A%2Bcomment2%0A",
151 "uri": "https://phab.mercurial-scm.org//api/differential.createrawdiff",
152 "headers": {
153 "content-type": [
154 "application/x-www-form-urlencoded"
155 ],
156 "accept": [
157 "application/mercurial-0.1"
158 ],
159 "user-agent": [
160 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
161 ],
162 "host": [
163 "phab.mercurial-scm.org"
164 ],
165 "content-length": [
166 "257"
167 ]
168 }
169 },
170 "response": {
171 "status": {
172 "code": 200,
173 "message": "OK"
174 },
175 "body": {
176 "string": "{\"result\":{\"id\":1990,\"phid\":\"PHID-DIFF-xfa4yzc5h2cvjfhpx4dv\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/differential\\/diff\\/1990\\/\"},\"error_code\":null,\"error_info\":null}"
177 },
178 "headers": {
179 "expires": [
180 "Sat, 01 Jan 2000 00:00:00 GMT"
181 ],
182 "content-type": [
183 "application/json"
184 ],
185 "connection": [
186 "keep-alive"
187 ],
188 "vary": [
189 "Accept-Encoding"
190 ],
191 "x-frame-options": [
192 "Deny"
193 ],
194 "strict-transport-security": [
195 "max-age=31536000; includeSubdomains; preload"
196 ],
197 "date": [
198 "Fri, 07 Jun 2019 20:26:59 GMT"
199 ],
200 "cache-control": [
201 "no-store"
202 ],
203 "referrer-policy": [
204 "no-referrer",
205 "strict-origin-when-cross-origin"
206 ],
207 "x-content-type-options": [
208 "nosniff"
209 ],
210 "content-length": [
211 "172"
212 ],
213 "x-xss-protection": [
214 "1; mode=block"
215 ]
216 }
217 }
218 },
219 {
220 "request": {
221 "method": "POST",
222 "body": "diff_id=1990&data=%7B%22branch%22%3A+%22default%22%2C+%22date%22%3A+%220+0%22%2C+%22node%22%3A+%221acd4b60af38c934182468719a8a431248f49bef%22%2C+%22parent%22%3A+%22a19f1434f9a578325eb9799c9961b5465d4e6e40%22%2C+%22user%22%3A+%22test%22%7D&api.token=cli-hahayouwish&name=hg%3Ameta",
223 "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty",
224 "headers": {
225 "content-type": [
226 "application/x-www-form-urlencoded"
227 ],
228 "accept": [
229 "application/mercurial-0.1"
230 ],
231 "user-agent": [
232 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
233 ],
234 "host": [
235 "phab.mercurial-scm.org"
236 ],
237 "content-length": [
238 "296"
239 ]
240 }
241 },
242 "response": {
243 "status": {
244 "code": 200,
245 "message": "OK"
246 },
247 "body": {
248 "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}"
249 },
250 "headers": {
251 "expires": [
252 "Sat, 01 Jan 2000 00:00:00 GMT"
253 ],
254 "content-type": [
255 "application/json"
256 ],
257 "connection": [
258 "keep-alive"
259 ],
260 "vary": [
261 "Accept-Encoding"
262 ],
263 "x-frame-options": [
264 "Deny"
265 ],
266 "strict-transport-security": [
267 "max-age=31536000; includeSubdomains; preload"
268 ],
269 "date": [
270 "Fri, 07 Jun 2019 20:26:59 GMT"
271 ],
272 "cache-control": [
273 "no-store"
274 ],
275 "referrer-policy": [
276 "no-referrer",
277 "strict-origin-when-cross-origin"
278 ],
279 "x-content-type-options": [
280 "nosniff"
281 ],
282 "content-length": [
283 "51"
284 ],
285 "x-xss-protection": [
286 "1; mode=block"
287 ]
288 }
289 }
290 },
291 {
292 "request": {
293 "method": "POST",
294 "body": "diff_id=1990&data=%7B%221acd4b60af38c934182468719a8a431248f49bef%22%3A+%7B%22author%22%3A+%22test%22%2C+%22authorEmail%22%3A+%22test%22%2C+%22branch%22%3A+%22default%22%2C+%22commit%22%3A+%221acd4b60af38c934182468719a8a431248f49bef%22%2C+%22parents%22%3A+%5B%22a19f1434f9a578325eb9799c9961b5465d4e6e40%22%5D%2C+%22time%22%3A+0%7D%7D&api.token=cli-hahayouwish&name=local%3Acommits",
295 "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty",
296 "headers": {
297 "content-type": [
298 "application/x-www-form-urlencoded"
299 ],
300 "accept": [
301 "application/mercurial-0.1"
302 ],
303 "user-agent": [
304 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
305 ],
306 "host": [
307 "phab.mercurial-scm.org"
308 ],
309 "content-length": [
310 "396"
311 ]
312 }
313 },
314 "response": {
315 "status": {
316 "code": 200,
317 "message": "OK"
318 },
319 "body": {
320 "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}"
321 },
322 "headers": {
323 "expires": [
324 "Sat, 01 Jan 2000 00:00:00 GMT"
325 ],
326 "content-type": [
327 "application/json"
328 ],
329 "connection": [
330 "keep-alive"
331 ],
332 "vary": [
333 "Accept-Encoding"
334 ],
335 "x-frame-options": [
336 "Deny"
337 ],
338 "strict-transport-security": [
339 "max-age=31536000; includeSubdomains; preload"
340 ],
341 "date": [
342 "Fri, 07 Jun 2019 20:27:00 GMT"
343 ],
344 "cache-control": [
345 "no-store"
346 ],
347 "referrer-policy": [
348 "no-referrer",
349 "strict-origin-when-cross-origin"
350 ],
351 "x-content-type-options": [
352 "nosniff"
353 ],
354 "content-length": [
355 "51"
356 ],
357 "x-xss-protection": [
358 "1; mode=block"
359 ]
360 }
361 }
362 },
363 {
364 "request": {
365 "method": "POST",
366 "body": "api.token=cli-hahayouwish&corpus=create+comment+for+phabricator+test%0A%0ADifferential+Revision%3A+https%3A%2F%2Fphab.mercurial-scm.org%2FD1253",
367 "uri": "https://phab.mercurial-scm.org//api/differential.parsecommitmessage",
368 "headers": {
369 "content-type": [
370 "application/x-www-form-urlencoded"
371 ],
372 "accept": [
373 "application/mercurial-0.1"
374 ],
375 "user-agent": [
376 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
377 ],
378 "host": [
379 "phab.mercurial-scm.org"
380 ],
381 "content-length": [
382 "165"
383 ]
384 }
385 },
386 "response": {
387 "status": {
388 "code": 200,
389 "message": "OK"
390 },
391 "body": {
392 "string": "{\"result\":{\"errors\":[],\"fields\":{\"title\":\"create comment for phabricator test\",\"revisionID\":1253},\"revisionIDFieldInfo\":{\"value\":1253,\"validDomain\":\"https:\\/\\/phab.mercurial-scm.org\"},\"transactions\":[{\"type\":\"title\",\"value\":\"create comment for phabricator test\"}]},\"error_code\":null,\"error_info\":null}"
393 },
394 "headers": {
395 "expires": [
396 "Sat, 01 Jan 2000 00:00:00 GMT"
397 ],
398 "content-type": [
399 "application/json"
400 ],
401 "connection": [
402 "keep-alive"
403 ],
404 "vary": [
405 "Accept-Encoding"
406 ],
407 "x-frame-options": [
408 "Deny"
409 ],
410 "strict-transport-security": [
411 "max-age=31536000; includeSubdomains; preload"
412 ],
413 "date": [
414 "Fri, 07 Jun 2019 20:27:01 GMT"
415 ],
416 "cache-control": [
417 "no-store"
418 ],
419 "referrer-policy": [
420 "no-referrer",
421 "strict-origin-when-cross-origin"
422 ],
423 "x-content-type-options": [
424 "nosniff"
425 ],
426 "content-length": [
427 "306"
428 ],
429 "x-xss-protection": [
430 "1; mode=block"
431 ]
432 }
433 }
434 },
435 {
436 "request": {
437 "method": "POST",
438 "body": "api.token=cli-hahayouwish&transactions%5B0%5D%5Btype%5D=update&transactions%5B0%5D%5Bvalue%5D=PHID-DIFF-xfa4yzc5h2cvjfhpx4dv&transactions%5B1%5D%5Btype%5D=comment&transactions%5B1%5D%5Bvalue%5D=Address+review+comments&transactions%5B2%5D%5Btype%5D=title&transactions%5B2%5D%5Bvalue%5D=create+comment+for+phabricator+test&objectIdentifier=1253",
439 "uri": "https://phab.mercurial-scm.org//api/differential.revision.edit",
440 "headers": {
441 "content-type": [
442 "application/x-www-form-urlencoded"
443 ],
444 "accept": [
445 "application/mercurial-0.1"
446 ],
447 "user-agent": [
448 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
449 ],
450 "host": [
451 "phab.mercurial-scm.org"
452 ],
453 "content-length": [
454 "359"
455 ]
456 }
457 },
458 "response": {
459 "status": {
460 "code": 200,
461 "message": "OK"
462 },
463 "body": {
464 "string": "{\"result\":{\"object\":{\"id\":1253,\"phid\":\"PHID-DREV-4rhqd6v3yxbtodc7wbv7\"},\"transactions\":[{\"phid\":\"PHID-XACT-DREV-punz3dredrxghth\"},{\"phid\":\"PHID-XACT-DREV-ykwxppmzdgrtgye\"}]},\"error_code\":null,\"error_info\":null}"
465 },
466 "headers": {
467 "expires": [
468 "Sat, 01 Jan 2000 00:00:00 GMT"
469 ],
470 "content-type": [
471 "application/json"
472 ],
473 "connection": [
474 "keep-alive"
475 ],
476 "vary": [
477 "Accept-Encoding"
478 ],
479 "x-frame-options": [
480 "Deny"
481 ],
482 "strict-transport-security": [
483 "max-age=31536000; includeSubdomains; preload"
484 ],
485 "date": [
486 "Fri, 07 Jun 2019 20:27:02 GMT"
487 ],
488 "cache-control": [
489 "no-store"
490 ],
491 "referrer-policy": [
492 "no-referrer",
493 "strict-origin-when-cross-origin"
494 ],
495 "x-content-type-options": [
496 "nosniff"
497 ],
498 "content-length": [
499 "210"
500 ],
501 "x-xss-protection": [
502 "1; mode=block"
503 ]
504 }
505 }
506 },
507 {
508 "request": {
509 "method": "POST",
510 "body": "api.token=cli-hahayouwish&ids%5B0%5D=1253",
511 "uri": "https://phab.mercurial-scm.org//api/differential.query",
512 "headers": {
513 "content-type": [
514 "application/x-www-form-urlencoded"
515 ],
516 "accept": [
517 "application/mercurial-0.1"
518 ],
519 "user-agent": [
520 "mercurial/proto-1.0 (Mercurial 5.0.1+253-f2ebe61e9a8e+20190607)"
521 ],
522 "host": [
523 "phab.mercurial-scm.org"
524 ],
525 "content-length": [
526 "58"
527 ]
528 }
529 },
530 "response": {
531 "status": {
532 "code": 200,
533 "message": "OK"
534 },
535 "body": {
536 "string": "{\"result\":[{\"id\":\"1253\",\"phid\":\"PHID-DREV-4rhqd6v3yxbtodc7wbv7\",\"title\":\"create comment for phabricator test\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D1253\",\"dateCreated\":\"1559938988\",\"dateModified\":\"1559939221\",\"authorPHID\":\"PHID-USER-qmzis76vb2yh3ogldu6r\",\"status\":\"0\",\"statusName\":\"Needs Review\",\"properties\":{\"draft.broadcast\":true,\"lines.added\":2,\"lines.removed\":0,\"buildables\":{\"PHID-HMBB-hsvjwe4uccbkgjpvffhz\":{\"status\":\"passed\"}}},\"branch\":null,\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"2\",\"activeDiffPHID\":\"PHID-DIFF-xfa4yzc5h2cvjfhpx4dv\",\"diffs\":[\"1990\",\"1989\"],\"commits\":[],\"reviewers\":[],\"ccs\":[],\"hashes\":[],\"auxiliary\":{\"bugzilla.bug-id\":null,\"phabricator:projects\":[],\"phabricator:depends-on\":[]},\"repositoryPHID\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"sourcePath\":null}],\"error_code\":null,\"error_info\":null}"
537 },
538 "headers": {
539 "expires": [
540 "Sat, 01 Jan 2000 00:00:00 GMT"
541 ],
542 "content-type": [
543 "application/json"
544 ],
545 "connection": [
546 "keep-alive"
547 ],
548 "vary": [
549 "Accept-Encoding"
550 ],
551 "x-frame-options": [
552 "Deny"
553 ],
554 "strict-transport-security": [
555 "max-age=31536000; includeSubdomains; preload"
556 ],
557 "date": [
558 "Fri, 07 Jun 2019 20:27:02 GMT"
559 ],
560 "cache-control": [
561 "no-store"
562 ],
563 "referrer-policy": [
564 "no-referrer",
565 "strict-origin-when-cross-origin"
566 ],
567 "x-content-type-options": [
568 "nosniff"
569 ],
570 "content-length": [
571 "822"
572 ],
573 "x-xss-protection": [
574 "1; mode=block"
575 ]
576 }
577 }
578 }
579 ],
580 "version": 1
581 } No newline at end of file
@@ -416,7 +416,7 b' def writediffproperties(ctx, diff):'
416 callconduit(ctx.repo(), b'differential.setdiffproperty', params)
416 callconduit(ctx.repo(), b'differential.setdiffproperty', params)
417
417
418 def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None,
418 def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None,
419 olddiff=None, actions=None):
419 olddiff=None, actions=None, comment=None):
420 """create or update a Differential Revision
420 """create or update a Differential Revision
421
421
422 If revid is None, create a new Differential Revision, otherwise update
422 If revid is None, create a new Differential Revision, otherwise update
@@ -439,6 +439,8 b' def createdifferentialrevision(ctx, revi'
439 if neednewdiff:
439 if neednewdiff:
440 diff = creatediff(ctx)
440 diff = creatediff(ctx)
441 transactions.append({b'type': b'update', b'value': diff[b'phid']})
441 transactions.append({b'type': b'update', b'value': diff[b'phid']})
442 if comment:
443 transactions.append({b'type': b'comment', b'value': comment})
442 else:
444 else:
443 # Even if we don't need to upload a new diff because the patch content
445 # Even if we don't need to upload a new diff because the patch content
444 # does not change. We might still need to update its metadata so
446 # does not change. We might still need to update its metadata so
@@ -497,6 +499,8 b' def userphids(repo, names):'
497 [(b'r', b'rev', [], _(b'revisions to send'), _(b'REV')),
499 [(b'r', b'rev', [], _(b'revisions to send'), _(b'REV')),
498 (b'', b'amend', True, _(b'update commit messages')),
500 (b'', b'amend', True, _(b'update commit messages')),
499 (b'', b'reviewer', [], _(b'specify reviewers')),
501 (b'', b'reviewer', [], _(b'specify reviewers')),
502 (b'm', b'comment', b'',
503 _(b'add a comment to Revisions with new/updated Diffs')),
500 (b'', b'confirm', None, _(b'ask for confirmation before sending'))],
504 (b'', b'confirm', None, _(b'ask for confirmation before sending'))],
501 _(b'REV [OPTIONS]'),
505 _(b'REV [OPTIONS]'),
502 helpcategory=command.CATEGORY_IMPORT_EXPORT)
506 helpcategory=command.CATEGORY_IMPORT_EXPORT)
@@ -567,7 +571,8 b' def phabsend(ui, repo, *revs, **opts):'
567 if oldnode != ctx.node() or opts.get(b'amend'):
571 if oldnode != ctx.node() or opts.get(b'amend'):
568 # Create or update Differential Revision
572 # Create or update Differential Revision
569 revision, diff = createdifferentialrevision(
573 revision, diff = createdifferentialrevision(
570 ctx, revid, lastrevid, oldnode, olddiff, actions)
574 ctx, revid, lastrevid, oldnode, olddiff, actions,
575 opts.get(b'comment'))
571 diffmap[ctx.node()] = diff
576 diffmap[ctx.node()] = diff
572 newrevid = int(revision[b'object'][b'id'])
577 newrevid = int(revision[b'object'][b'id'])
573 if revid:
578 if revid:
@@ -118,4 +118,17 b' Template keywords'
118 1 https://phab.mercurial-scm.org/D1191 D1191
118 1 https://phab.mercurial-scm.org/D1191 D1191
119 0 https://phab.mercurial-scm.org/D1190 D1190
119 0 https://phab.mercurial-scm.org/D1190 D1190
120
120
121 Commenting when phabsending:
122 $ echo comment > comment
123 $ hg ci --addremove -m "create comment for phabricator test"
124 adding comment
125 $ hg phabsend -r . -m "For default branch" --test-vcr "$VCR/phabsend-comment-created.json"
126 D1253 - created - a7ee4bac036a: create comment for phabricator test
127 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a7ee4bac036a-8009b5a0-phabsend.hg
128 $ echo comment2 >> comment
129 $ hg ci --amend
130 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/81fce7de1b7d-05339e5b-amend.hg
131 $ hg phabsend -r . -m "Address review comments" --test-vcr "$VCR/phabsend-comment-updated.json"
132 D1253 - updated - 1acd4b60af38: create comment for phabricator test
133
121 $ cd ..
134 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now