Mercurial > hg
comparison tests/test-phabricator.t @ 44718:0680b8a1992a
phabricator: avoid creating unstable children within the review stack
The instability occurred when rebasing something that has already been submitted
onto something that hasn't, and then resubmitting the stack. Or as the test
shows, just resubmitting and including something earlier that wasn't previously
submitted.
There's a general case here where any children (not just the ones in the range
of commits posted for review) should be re-stabilized. But handling the
selected commits here will cause the `local:commit` node values that are tracked
on Phabricator to be properly kept in sync.
Differential Revision: https://phab.mercurial-scm.org/D8436
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 03 Mar 2020 17:37:09 -0500 |
parents | 3dc6a70779f2 |
children | c482e2fe444c |
comparison
equal
deleted
inserted
replaced
44717:3dc6a70779f2 | 44718:0680b8a1992a |
---|---|
178 | 178 |
179 Phabsending a skipped commit: | 179 Phabsending a skipped commit: |
180 $ hg phabsend --no-amend -r . --test-vcr "$VCR/phabsend-skipped.json" | 180 $ hg phabsend --no-amend -r . --test-vcr "$VCR/phabsend-skipped.json" |
181 1849d7828727 mapped to old nodes ['1849d7828727'] | 181 1849d7828727 mapped to old nodes ['1849d7828727'] |
182 D7919 - skipped - 1849d7828727: create comment for phabricator test | 182 D7919 - skipped - 1849d7828727: create comment for phabricator test |
183 | |
184 Phabsend doesn't create an instability when rebasing existing revisions on top | |
185 of new revisions. | |
186 | |
187 $ hg init reorder | |
188 $ cd reorder | |
189 $ cat >> .hg/hgrc <<EOF | |
190 > [phabricator] | |
191 > url = https://phab.mercurial-scm.org/ | |
192 > callsign = HG | |
193 > [experimental] | |
194 > evolution = all | |
195 > EOF | |
196 | |
197 $ echo "add" > file1.txt | |
198 $ hg ci -Aqm 'added' | |
199 $ echo "mod1" > file1.txt | |
200 $ hg ci -m 'modified 1' | |
201 $ echo "mod2" > file1.txt | |
202 $ hg ci -m 'modified 2' | |
203 $ hg phabsend -r . --test-vcr "$VCR/phabsend-add-parent-setup.json" | |
204 D8433 - created - 5d3959e20d1d: modified 2 | |
205 new commits: ['2b4aa8a88d61'] | |
206 $ hg log -G -T compact | |
207 @ 3[tip]:1 2b4aa8a88d61 1970-01-01 00:00 +0000 test | |
208 | modified 2 | |
209 | | |
210 o 1 d549263bcb2d 1970-01-01 00:00 +0000 test | |
211 | modified 1 | |
212 | | |
213 o 0 5cbade24e0fa 1970-01-01 00:00 +0000 test | |
214 added | |
215 | |
216 $ hg phabsend -r ".^ + ." --test-vcr "$VCR/phabsend-add-parent.json" | |
217 2b4aa8a88d61 mapped to old nodes ['2b4aa8a88d61'] | |
218 D8434 - created - d549263bcb2d: modified 1 | |
219 D8433 - updated - 2b4aa8a88d61: modified 2 | |
220 new commits: ['876a60d024de'] | |
221 new commits: ['0c6523cb1d0f'] | |
222 $ hg log -G -T compact | |
223 @ 5[tip] 1dff6b051abf 1970-01-01 00:00 +0000 test | |
224 | modified 2 | |
225 | | |
226 o 4:0 eb3752621d45 1970-01-01 00:00 +0000 test | |
227 | modified 1 | |
228 | | |
229 o 0 5cbade24e0fa 1970-01-01 00:00 +0000 test | |
230 added | |
231 | |
232 $ cd .. | |
183 | 233 |
184 Phabesending a new binary, a modified binary, and a removed binary | 234 Phabesending a new binary, a modified binary, and a removed binary |
185 | 235 |
186 >>> open('bin', 'wb').write(b'\0a') and None | 236 >>> open('bin', 'wb').write(b'\0a') and None |
187 $ hg ci -Am 'add binary' | 237 $ hg ci -Am 'add binary' |