Mercurial > hg
annotate tests/test-wireproto-command-pushkey.t @ 46836:80cac9936324
reabase: call rewriteutil.precheck() a bit later
We now filter out descendants of divergence-causing commits in
`_handleskippingobsolete()`. The filtered-out commits are removed from
the rebase set (`destmap` and `state`). We should therefore call
`rewriteutil.precheck()` after `_handleskippingobsolete()`. This patch
does that. It hasn't mattered so far because `rewriteutil.precheck()`
doesn't yet check for divergence, but it will soon.
This affects one test where we now fail because the user is trying to
rebase an ancestor instead of failing because they tried to rebase a
public commit. We have several similar tests just after, where we
still fail because of the phase, so that seems fine. The difference in
behavior also seems fine to me.
Differential Revision: https://phab.mercurial-scm.org/D10258
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 23 Mar 2021 14:15:40 -0700 |
parents | a732d70253b0 |
children |
rev | line source |
---|---|
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 $ . $TESTDIR/wireprotohelpers.sh |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 $ hg init server |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 $ enablehttpv2 server |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 $ cd server |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 $ cat >> .hg/hgrc << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 > [web] |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 > push_ssl = false |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 > allow-push = * |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 $ hg debugdrawdag << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 > C D |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 > |/ |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 > B |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 > | |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 > A |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 $ cat hg.pid > $DAEMON_PIDS |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 pushkey for a bookmark works |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 $ sendhttpv2peer << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 > command pushkey |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 > namespace bookmarks |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 > key @ |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 > old |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 > new 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 creating http peer for wire protocol version 2 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 sending pushkey command |
37721
f7673845b167
wireprotov2: decode responses to their expected types
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37719
diff
changeset
|
33 response: True |
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 $ sendhttpv2peer << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 > command listkeys |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 > namespace bookmarks |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 creating http peer for wire protocol version 2 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 sending listkeys command |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
41 response: { |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
42 b'@': b'426bada5c67598ca65036d57d9e4b64b0c1ce7a0' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
43 } |
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 $ cat error.log |