Mercurial > hg
annotate tests/test-infinitepush.t @ 37295:45b39c69fae0
wireproto: separate commands tables for version 1 and 2 commands
We can't easily reuse existing command handlers for version 2
commands because the response types will be different. e.g. many
commands return nodes encoded as hex. Our new wire protocol is
binary safe, so we'll wish to encode nodes as binary.
We /could/ teach each command handler to look at the protocol
handler and change behavior based on the version in use. However,
this would make logic a bit unwieldy over time and would make
it harder to design a unified protocol handler interface. I think
it's better to create a clean break between version 1 and version 2
of commands on the server.
What I imagine happening is we will have separate @wireprotocommand
functions for each protocol generation. Those functions will parse the
request, dispatch to a common function to process it, then generate
the response in its own, transport-specific manner.
This commit establishes a separate table for tracking version 1
commands from version 2 commands. The HTTP server pieces have been
updated to use this new table.
Most commands are marked as both version 1 and version 2, so there is
little practical impact to this change.
A side-effect of this change is we now rely on transport registration
in wireprototypes.TRANSPORTS and certain properties of the protocol
interface. So a test had to be updated to conform.
Differential Revision: https://phab.mercurial-scm.org/D2982
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 28 Mar 2018 10:40:41 -0700 |
parents | 95cc57a74363 |
children | 24c7428983c5 |
rev | line source |
---|---|
37187
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
1 Testing infinipush extension and the confi options provided by it |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
3 Setup |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
4 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
5 $ . "$TESTDIR/library-infinitepush.sh" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
6 $ cp $HGRCPATH $TESTTMP/defaulthgrc |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
7 $ setupcommon |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
8 $ hg init repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
9 $ cd repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
10 $ setupserver |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
11 $ echo initialcommit > initialcommit |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
12 $ hg ci -Aqm "initialcommit" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
13 $ hg phase --public . |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
14 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
15 $ cd .. |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
16 $ hg clone ssh://user@dummy/repo client -q |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
18 Create two heads. Push first head alone, then two heads together. Make sure that |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
19 multihead push works. |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
20 $ cd client |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
21 $ echo multihead1 > multihead1 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
22 $ hg add multihead1 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
23 $ hg ci -m "multihead1" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
24 $ hg up null |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
25 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
26 $ echo multihead2 > multihead2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
27 $ hg ci -Am "multihead2" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
28 adding multihead2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
29 created new head |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
30 $ hg push -r . --bundle-store |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
31 pushing to ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
32 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
33 remote: pushing 1 commit: |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
34 remote: ee4802bf6864 multihead2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
35 $ hg push -r '1:2' --bundle-store |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
36 pushing to ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
37 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
38 remote: pushing 2 commits: |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
39 remote: bc22f9a30a82 multihead1 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
40 remote: ee4802bf6864 multihead2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
41 $ scratchnodes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
42 bc22f9a30a821118244deacbd732e394ed0b686c ab1bc557aa090a9e4145512c734b6e8a828393a5 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
43 ee4802bf6864326a6b3dcfff5a03abc2a0a69b8f ab1bc557aa090a9e4145512c734b6e8a828393a5 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
44 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
45 Create two new scratch bookmarks |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
46 $ hg up 0 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
47 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
48 $ echo scratchfirstpart > scratchfirstpart |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
49 $ hg ci -Am "scratchfirstpart" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
50 adding scratchfirstpart |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
51 created new head |
37199
c5687ce3b411
infinitepush: drop the `--to` flag to push and use `-B` instead
Pulkit Goyal <7895pulkit@gmail.com>
parents:
37198
diff
changeset
|
52 $ hg push -r . -B scratch/firstpart |
37187
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
53 pushing to ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
54 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
55 remote: pushing 1 commit: |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
56 remote: 176993b87e39 scratchfirstpart |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
57 $ hg up 0 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
59 $ echo scratchsecondpart > scratchsecondpart |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
60 $ hg ci -Am "scratchsecondpart" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
61 adding scratchsecondpart |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
62 created new head |
37199
c5687ce3b411
infinitepush: drop the `--to` flag to push and use `-B` instead
Pulkit Goyal <7895pulkit@gmail.com>
parents:
37198
diff
changeset
|
63 $ hg push -r . -B scratch/secondpart |
37187
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
64 pushing to ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
65 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
66 remote: pushing 1 commit: |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
67 remote: 8db3891c220e scratchsecondpart |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
68 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
69 Pull two bookmarks from the second client |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
70 $ cd .. |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
71 $ hg clone ssh://user@dummy/repo client2 -q |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
72 $ cd client2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
73 $ hg pull -B scratch/firstpart -B scratch/secondpart |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
74 pulling from ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
75 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
76 adding changesets |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
77 adding manifests |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
78 adding file changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
79 added 1 changesets with 1 changes to 1 files |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
80 adding changesets |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
81 adding manifests |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
82 adding file changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
83 added 1 changesets with 1 changes to 1 files (+1 heads) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
84 new changesets * (glob) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
85 (run 'hg heads' to see heads, 'hg merge' to merge) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
86 $ hg log -r scratch/secondpart -T '{node}' |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
87 8db3891c220e216f6da214e8254bd4371f55efca (no-eol) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
88 $ hg log -r scratch/firstpart -T '{node}' |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
89 176993b87e39bd88d66a2cccadabe33f0b346339 (no-eol) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
90 Make two commits to the scratch branch |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
91 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
92 $ echo testpullbycommithash1 > testpullbycommithash1 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
93 $ hg ci -Am "testpullbycommithash1" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
94 adding testpullbycommithash1 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
95 created new head |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
96 $ hg log -r '.' -T '{node}\n' > ../testpullbycommithash1 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
97 $ echo testpullbycommithash2 > testpullbycommithash2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
98 $ hg ci -Aqm "testpullbycommithash2" |
37199
c5687ce3b411
infinitepush: drop the `--to` flag to push and use `-B` instead
Pulkit Goyal <7895pulkit@gmail.com>
parents:
37198
diff
changeset
|
99 $ hg push -r . -B scratch/mybranch -q |
37187
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
100 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
101 Create third client and pull by commit hash. |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
102 Make sure testpullbycommithash2 has not fetched |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
103 $ cd .. |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
104 $ hg clone ssh://user@dummy/repo client3 -q |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
105 $ cd client3 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
106 $ hg pull -r `cat ../testpullbycommithash1` |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
107 pulling from ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
108 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
109 adding changesets |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
110 adding manifests |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
111 adding file changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
112 added 1 changesets with 1 changes to 1 files |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
113 new changesets 33910bfe6ffe |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
114 (run 'hg update' to get a working copy) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
115 $ hg log -G -T '{desc} {phase} {bookmarks}' |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
116 o testpullbycommithash1 draft |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
117 | |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
118 @ initialcommit public |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
119 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
120 Make public commit in the repo and pull it. |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
121 Make sure phase on the client is public. |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
122 $ cd ../repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
123 $ echo publiccommit > publiccommit |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
124 $ hg ci -Aqm "publiccommit" |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
125 $ hg phase --public . |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
126 $ cd ../client3 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
127 $ hg pull |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
128 pulling from ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
129 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
130 adding changesets |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
131 adding manifests |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
132 adding file changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
133 added 1 changesets with 1 changes to 1 files (+1 heads) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
134 new changesets a79b6597f322 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
135 (run 'hg heads' to see heads, 'hg merge' to merge) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
136 $ hg log -G -T '{desc} {phase} {bookmarks} {node|short}' |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
137 o publiccommit public a79b6597f322 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
138 | |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
139 | o testpullbycommithash1 draft 33910bfe6ffe |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
140 |/ |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
141 @ initialcommit public 67145f466344 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
142 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
143 $ hg up a79b6597f322 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
144 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
145 $ echo scratchontopofpublic > scratchontopofpublic |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
146 $ hg ci -Aqm "scratchontopofpublic" |
37199
c5687ce3b411
infinitepush: drop the `--to` flag to push and use `-B` instead
Pulkit Goyal <7895pulkit@gmail.com>
parents:
37198
diff
changeset
|
147 $ hg push -r . -B scratch/scratchontopofpublic |
37187
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
148 pushing to ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
149 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
150 remote: pushing 1 commit: |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
151 remote: c70aee6da07d scratchontopofpublic |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
152 $ cd ../client2 |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
153 $ hg pull -B scratch/scratchontopofpublic |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
154 pulling from ssh://user@dummy/repo |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
155 searching for changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
156 adding changesets |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
157 adding manifests |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
158 adding file changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
159 added 1 changesets with 1 changes to 1 files (+1 heads) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
160 adding changesets |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
161 adding manifests |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
162 adding file changes |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
163 added 1 changesets with 1 changes to 1 files |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
164 new changesets a79b6597f322:c70aee6da07d |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
165 (run 'hg heads .' to see heads, 'hg merge' to merge) |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
166 $ hg log -r scratch/scratchontopofpublic -T '{phase}' |
03ff17a4bf53
infinitepush: move the extension to core from fb-hgext
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
167 draft (no-eol) |