Show More
@@ -0,0 +1,218 b'' | |||||
|
1 | { | |||
|
2 | "version": 1, | |||
|
3 | "interactions": [ | |||
|
4 | { | |||
|
5 | "request": { | |||
|
6 | "method": "POST", | |||
|
7 | "uri": "https://phab.mercurial-scm.org//api/differential.query", | |||
|
8 | "body": "params=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22ids%22%3A+%5B7917%2C+7918%5D%7D&output=json&__conduit__=1", | |||
|
9 | "headers": { | |||
|
10 | "accept": [ | |||
|
11 | "application/mercurial-0.1" | |||
|
12 | ], | |||
|
13 | "content-length": [ | |||
|
14 | "154" | |||
|
15 | ], | |||
|
16 | "content-type": [ | |||
|
17 | "application/x-www-form-urlencoded" | |||
|
18 | ], | |||
|
19 | "host": [ | |||
|
20 | "phab.mercurial-scm.org" | |||
|
21 | ], | |||
|
22 | "user-agent": [ | |||
|
23 | "mercurial/proto-1.0 (Mercurial 5.6+124-da178b816812+20201120)" | |||
|
24 | ] | |||
|
25 | } | |||
|
26 | }, | |||
|
27 | "response": { | |||
|
28 | "status": { | |||
|
29 | "code": 200, | |||
|
30 | "message": "OK" | |||
|
31 | }, | |||
|
32 | "headers": { | |||
|
33 | "X-XSS-Protection": [ | |||
|
34 | "1; mode=block" | |||
|
35 | ], | |||
|
36 | "Date": [ | |||
|
37 | "Sat, 21 Nov 2020 04:42:44 GMT" | |||
|
38 | ], | |||
|
39 | "Referrer-Policy": [ | |||
|
40 | "no-referrer" | |||
|
41 | ], | |||
|
42 | "Strict-Transport-Security": [ | |||
|
43 | "max-age=0; includeSubdomains; preload" | |||
|
44 | ], | |||
|
45 | "Cache-Control": [ | |||
|
46 | "no-store" | |||
|
47 | ], | |||
|
48 | "Set-Cookie": [ | |||
|
49 | "phsid=A%2Fw422dnwrfacwgvoi3igw4xdjyojfi67muc4ucxxs; expires=Thu, 20-Nov-2025 04:42:44 GMT; Max-Age=157680000; path=/; domain=phab.mercurial-scm.org; secure; httponly" | |||
|
50 | ], | |||
|
51 | "X-Content-Type-Options": [ | |||
|
52 | "nosniff" | |||
|
53 | ], | |||
|
54 | "X-Frame-Options": [ | |||
|
55 | "Deny" | |||
|
56 | ], | |||
|
57 | "Server": [ | |||
|
58 | "Apache/2.4.10 (Debian)" | |||
|
59 | ], | |||
|
60 | "Transfer-Encoding": [ | |||
|
61 | "chunked" | |||
|
62 | ], | |||
|
63 | "Content-Type": [ | |||
|
64 | "application/json" | |||
|
65 | ], | |||
|
66 | "Expires": [ | |||
|
67 | "Sat, 01 Jan 2000 00:00:00 GMT" | |||
|
68 | ] | |||
|
69 | }, | |||
|
70 | "body": { | |||
|
71 | "string": "{\"result\":[{\"id\":\"7918\",\"phid\":\"PHID-DREV-sfsckrwrwc77rdl3k5rz\",\"title\":\"create draft change for phabricator testing\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D7918\",\"dateCreated\":\"1579221164\",\"dateModified\":\"1579222305\",\"authorPHID\":\"PHID-USER-tzhaient733lwrlbcag5\",\"status\":\"4\",\"statusName\":\"Abandoned\",\"properties\":{\"draft.broadcast\":true,\"lines.added\":1,\"lines.removed\":2},\"branch\":\"default\",\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"3\",\"activeDiffPHID\":\"PHID-DIFF-pqdlhei24n47fzeofjph\",\"diffs\":[\"19394\"],\"commits\":[],\"reviewers\":{\"PHID-PROJ-3dvcxzznrjru2xmmses3\":\"PHID-PROJ-3dvcxzznrjru2xmmses3\"},\"ccs\":[\"PHID-USER-q42dn7cc3donqriafhjx\"],\"hashes\":[[\"hgcm\",\"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\"]],\"auxiliary\":{\"phabricator:projects\":[],\"phabricator:depends-on\":[\"PHID-DREV-yhl3yvijs4jploa5iqm4\"]},\"repositoryPHID\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"sourcePath\":\"\\/\"},{\"id\":\"7917\",\"phid\":\"PHID-DREV-yhl3yvijs4jploa5iqm4\",\"title\":\"create public change for phabricator testing\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D7917\",\"dateCreated\":\"1579221160\",\"dateModified\":\"1579222286\",\"authorPHID\":\"PHID-USER-tzhaient733lwrlbcag5\",\"status\":\"4\",\"statusName\":\"Abandoned\",\"properties\":{\"draft.broadcast\":true,\"lines.added\":1,\"lines.removed\":1},\"branch\":\"default\",\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"2\",\"activeDiffPHID\":\"PHID-DIFF-e64weyerxtutv2jvj2dt\",\"diffs\":[\"19393\"],\"commits\":[],\"reviewers\":{\"PHID-PROJ-3dvcxzznrjru2xmmses3\":\"PHID-PROJ-3dvcxzznrjru2xmmses3\"},\"ccs\":[\"PHID-USER-q42dn7cc3donqriafhjx\"],\"hashes\":[[\"hgcm\",\"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\"]],\"auxiliary\":{\"phabricator:projects\":[],\"phabricator:depends-on\":[]},\"repositoryPHID\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"sourcePath\":\"\\/\"}],\"error_code\":null,\"error_info\":null}" | |||
|
72 | } | |||
|
73 | } | |||
|
74 | }, | |||
|
75 | { | |||
|
76 | "request": { | |||
|
77 | "method": "POST", | |||
|
78 | "uri": "https://phab.mercurial-scm.org//api/differential.revision.edit", | |||
|
79 | "body": "params=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22objectIdentifier%22%3A+%22PHID-DREV-yhl3yvijs4jploa5iqm4%22%2C+%22transactions%22%3A+%5B%7B%22type%22%3A+%22reclaim%22%2C+%22value%22%3A+true%7D%5D%7D&output=json&__conduit__=1", | |||
|
80 | "headers": { | |||
|
81 | "accept": [ | |||
|
82 | "application/mercurial-0.1" | |||
|
83 | ], | |||
|
84 | "content-length": [ | |||
|
85 | "273" | |||
|
86 | ], | |||
|
87 | "content-type": [ | |||
|
88 | "application/x-www-form-urlencoded" | |||
|
89 | ], | |||
|
90 | "host": [ | |||
|
91 | "phab.mercurial-scm.org" | |||
|
92 | ], | |||
|
93 | "user-agent": [ | |||
|
94 | "mercurial/proto-1.0 (Mercurial 5.6+124-da178b816812+20201120)" | |||
|
95 | ] | |||
|
96 | } | |||
|
97 | }, | |||
|
98 | "response": { | |||
|
99 | "status": { | |||
|
100 | "code": 200, | |||
|
101 | "message": "OK" | |||
|
102 | }, | |||
|
103 | "headers": { | |||
|
104 | "X-XSS-Protection": [ | |||
|
105 | "1; mode=block" | |||
|
106 | ], | |||
|
107 | "Date": [ | |||
|
108 | "Sat, 21 Nov 2020 04:42:44 GMT" | |||
|
109 | ], | |||
|
110 | "Referrer-Policy": [ | |||
|
111 | "no-referrer" | |||
|
112 | ], | |||
|
113 | "Strict-Transport-Security": [ | |||
|
114 | "max-age=0; includeSubdomains; preload" | |||
|
115 | ], | |||
|
116 | "Cache-Control": [ | |||
|
117 | "no-store" | |||
|
118 | ], | |||
|
119 | "Set-Cookie": [ | |||
|
120 | "phsid=A%2Fx3q7clkv3ti5yodbqj65kwkptz476tzun2uauime; expires=Thu, 20-Nov-2025 04:42:44 GMT; Max-Age=157680000; path=/; domain=phab.mercurial-scm.org; secure; httponly" | |||
|
121 | ], | |||
|
122 | "X-Content-Type-Options": [ | |||
|
123 | "nosniff" | |||
|
124 | ], | |||
|
125 | "X-Frame-Options": [ | |||
|
126 | "Deny" | |||
|
127 | ], | |||
|
128 | "Server": [ | |||
|
129 | "Apache/2.4.10 (Debian)" | |||
|
130 | ], | |||
|
131 | "Transfer-Encoding": [ | |||
|
132 | "chunked" | |||
|
133 | ], | |||
|
134 | "Content-Type": [ | |||
|
135 | "application/json" | |||
|
136 | ], | |||
|
137 | "Expires": [ | |||
|
138 | "Sat, 01 Jan 2000 00:00:00 GMT" | |||
|
139 | ] | |||
|
140 | }, | |||
|
141 | "body": { | |||
|
142 | "string": "{\"result\":{\"object\":{\"id\":7917,\"phid\":\"PHID-DREV-yhl3yvijs4jploa5iqm4\"},\"transactions\":[{\"phid\":\"PHID-XACT-DREV-6alffj324fqa2nj\"},{\"phid\":\"PHID-XACT-DREV-p4bkxo6zaqhcnvp\"}]},\"error_code\":null,\"error_info\":null}" | |||
|
143 | } | |||
|
144 | } | |||
|
145 | }, | |||
|
146 | { | |||
|
147 | "request": { | |||
|
148 | "method": "POST", | |||
|
149 | "uri": "https://phab.mercurial-scm.org//api/differential.revision.edit", | |||
|
150 | "body": "params=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22objectIdentifier%22%3A+%22PHID-DREV-sfsckrwrwc77rdl3k5rz%22%2C+%22transactions%22%3A+%5B%7B%22type%22%3A+%22reclaim%22%2C+%22value%22%3A+true%7D%5D%7D&output=json&__conduit__=1", | |||
|
151 | "headers": { | |||
|
152 | "accept": [ | |||
|
153 | "application/mercurial-0.1" | |||
|
154 | ], | |||
|
155 | "content-length": [ | |||
|
156 | "273" | |||
|
157 | ], | |||
|
158 | "content-type": [ | |||
|
159 | "application/x-www-form-urlencoded" | |||
|
160 | ], | |||
|
161 | "host": [ | |||
|
162 | "phab.mercurial-scm.org" | |||
|
163 | ], | |||
|
164 | "user-agent": [ | |||
|
165 | "mercurial/proto-1.0 (Mercurial 5.6+124-da178b816812+20201120)" | |||
|
166 | ] | |||
|
167 | } | |||
|
168 | }, | |||
|
169 | "response": { | |||
|
170 | "status": { | |||
|
171 | "code": 200, | |||
|
172 | "message": "OK" | |||
|
173 | }, | |||
|
174 | "headers": { | |||
|
175 | "X-XSS-Protection": [ | |||
|
176 | "1; mode=block" | |||
|
177 | ], | |||
|
178 | "Date": [ | |||
|
179 | "Sat, 21 Nov 2020 04:42:45 GMT" | |||
|
180 | ], | |||
|
181 | "Referrer-Policy": [ | |||
|
182 | "no-referrer" | |||
|
183 | ], | |||
|
184 | "Strict-Transport-Security": [ | |||
|
185 | "max-age=0; includeSubdomains; preload" | |||
|
186 | ], | |||
|
187 | "Cache-Control": [ | |||
|
188 | "no-store" | |||
|
189 | ], | |||
|
190 | "Set-Cookie": [ | |||
|
191 | "phsid=A%2Fmgusoeqrp6o43ru5uhrtttwzxtf32aqb5siez3oo; expires=Thu, 20-Nov-2025 04:42:45 GMT; Max-Age=157680000; path=/; domain=phab.mercurial-scm.org; secure; httponly" | |||
|
192 | ], | |||
|
193 | "X-Content-Type-Options": [ | |||
|
194 | "nosniff" | |||
|
195 | ], | |||
|
196 | "X-Frame-Options": [ | |||
|
197 | "Deny" | |||
|
198 | ], | |||
|
199 | "Server": [ | |||
|
200 | "Apache/2.4.10 (Debian)" | |||
|
201 | ], | |||
|
202 | "Transfer-Encoding": [ | |||
|
203 | "chunked" | |||
|
204 | ], | |||
|
205 | "Content-Type": [ | |||
|
206 | "application/json" | |||
|
207 | ], | |||
|
208 | "Expires": [ | |||
|
209 | "Sat, 01 Jan 2000 00:00:00 GMT" | |||
|
210 | ] | |||
|
211 | }, | |||
|
212 | "body": { | |||
|
213 | "string": "{\"result\":{\"object\":{\"id\":7918,\"phid\":\"PHID-DREV-sfsckrwrwc77rdl3k5rz\"},\"transactions\":[{\"phid\":\"PHID-XACT-DREV-wfo42n4hsabosy5\"},{\"phid\":\"PHID-XACT-DREV-aqluo36kykh2jae\"}]},\"error_code\":null,\"error_info\":null}" | |||
|
214 | } | |||
|
215 | } | |||
|
216 | } | |||
|
217 | ] | |||
|
218 | } No newline at end of file |
@@ -2235,8 +2235,9 b' def phabimport(ui, repo, *specs, **opts)' | |||||
2235 | (b'', b'resign', False, _(b'resign as a reviewer from revisions')), |
|
2235 | (b'', b'resign', False, _(b'resign as a reviewer from revisions')), | |
2236 | (b'', b'commandeer', False, _(b'commandeer revisions')), |
|
2236 | (b'', b'commandeer', False, _(b'commandeer revisions')), | |
2237 | (b'm', b'comment', b'', _(b'comment on the last revision')), |
|
2237 | (b'm', b'comment', b'', _(b'comment on the last revision')), | |
|
2238 | (b'r', b'rev', b'', _(b'local revision to update'), _(b'REV')), | |||
2238 | ], |
|
2239 | ], | |
2239 | _(b'DREVSPEC... [OPTIONS]'), |
|
2240 | _(b'[DREVSPEC...| -r REV...] [OPTIONS]'), | |
2240 | helpcategory=command.CATEGORY_IMPORT_EXPORT, |
|
2241 | helpcategory=command.CATEGORY_IMPORT_EXPORT, | |
2241 | optionalrepo=True, |
|
2242 | optionalrepo=True, | |
2242 | ) |
|
2243 | ) | |
@@ -2266,6 +2267,28 b' def phabupdate(ui, repo, *specs, **opts)' | |||||
2266 | for f in flags: |
|
2267 | for f in flags: | |
2267 | actions.append({b'type': f, b'value': True}) |
|
2268 | actions.append({b'type': f, b'value': True}) | |
2268 |
|
2269 | |||
|
2270 | revs = opts.get(b'rev') | |||
|
2271 | if revs: | |||
|
2272 | if not repo: | |||
|
2273 | raise error.InputError(_(b'--rev requires a repository')) | |||
|
2274 | ||||
|
2275 | if specs: | |||
|
2276 | raise error.InputError(_(b'cannot specify both DREVSPEC and --rev')) | |||
|
2277 | ||||
|
2278 | drevmap = getdrevmap(repo, scmutil.revrange(repo, [revs])) | |||
|
2279 | specs = [] | |||
|
2280 | unknown = [] | |||
|
2281 | for r, d in pycompat.iteritems(drevmap): | |||
|
2282 | if d is None: | |||
|
2283 | unknown.append(repo[r]) | |||
|
2284 | else: | |||
|
2285 | specs.append(b'D%d' % d) | |||
|
2286 | if unknown: | |||
|
2287 | raise error.InputError( | |||
|
2288 | _(b'selected revisions without a Differential: %s') | |||
|
2289 | % scmutil.nodesummaries(repo, unknown) | |||
|
2290 | ) | |||
|
2291 | ||||
2269 | drevs = _getdrevs(ui, opts.get(b'stack'), specs) |
|
2292 | drevs = _getdrevs(ui, opts.get(b'stack'), specs) | |
2270 | for i, drev in enumerate(drevs): |
|
2293 | for i, drev in enumerate(drevs): | |
2271 | if i + 1 == len(drevs) and opts.get(b'comment'): |
|
2294 | if i + 1 == len(drevs) and opts.get(b'comment'): |
@@ -590,6 +590,14 b' Phabimport can create secret commits' | |||||
590 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
590 | date: Thu Jan 01 00:00:00 1970 +0000 | |
591 | summary: create beta for phabricator test |
|
591 | summary: create beta for phabricator test | |
592 |
|
592 | |||
|
593 | phabupdate can convert from local revisions | |||
|
594 | ||||
|
595 | $ hg phabupdate --reclaim D7917 -r '.: and not public()' | |||
|
596 | abort: cannot specify both DREVSPEC and --rev | |||
|
597 | [10] | |||
|
598 | ||||
|
599 | $ hg phabupdate --reclaim -r '.: and not public()' --test-vcr "$VCR/phabupdate-revs.json" | |||
|
600 | ||||
593 | Phabimport accepts multiple DREVSPECs |
|
601 | Phabimport accepts multiple DREVSPECs | |
594 |
|
602 | |||
595 | $ hg rollback --config ui.rollback=True |
|
603 | $ hg rollback --config ui.rollback=True |
General Comments 0
You need to be logged in to leave comments.
Login now