Mercurial > hg
comparison tests/test-infinitepush.t @ 37199:c5687ce3b411
infinitepush: drop the `--to` flag to push and use `-B` instead
The extension added a `--to` flag to specify the bookmark to which revs should
be pushed. This patch deletes that flag and instead uses the `-B` flag. After
this patch, bookmark passed as `-B` is parsed and if it matches the infinitepush
bookmark pattern, we consider that push as infinitepush.
This is still not the best of what we can do. Later patches in the series will
drop the use of `-B` flag and will instead handle things at bookmark bundle2
part. Plugging these logic to bookmark bundle2 part will also get rid of the
scratchbranchparttype bundle2 part.
Differential Revision: https://phab.mercurial-scm.org/D2108
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 09 Feb 2018 15:49:46 +0530 |
parents | 78c2e9418278 |
children | 8b5d7ef81066 |
comparison
equal
deleted
inserted
replaced
37198:78c2e9418278 | 37199:c5687ce3b411 |
---|---|
47 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 47 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
48 $ echo scratchfirstpart > scratchfirstpart | 48 $ echo scratchfirstpart > scratchfirstpart |
49 $ hg ci -Am "scratchfirstpart" | 49 $ hg ci -Am "scratchfirstpart" |
50 adding scratchfirstpart | 50 adding scratchfirstpart |
51 created new head | 51 created new head |
52 $ hg push -r . --to scratch/firstpart | 52 $ hg push -r . -B scratch/firstpart |
53 pushing to ssh://user@dummy/repo | 53 pushing to ssh://user@dummy/repo |
54 searching for changes | 54 searching for changes |
55 remote: pushing 1 commit: | 55 remote: pushing 1 commit: |
56 remote: 176993b87e39 scratchfirstpart | 56 remote: 176993b87e39 scratchfirstpart |
57 $ hg up 0 | 57 $ hg up 0 |
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
59 $ echo scratchsecondpart > scratchsecondpart | 59 $ echo scratchsecondpart > scratchsecondpart |
60 $ hg ci -Am "scratchsecondpart" | 60 $ hg ci -Am "scratchsecondpart" |
61 adding scratchsecondpart | 61 adding scratchsecondpart |
62 created new head | 62 created new head |
63 $ hg push -r . --to scratch/secondpart | 63 $ hg push -r . -B scratch/secondpart |
64 pushing to ssh://user@dummy/repo | 64 pushing to ssh://user@dummy/repo |
65 searching for changes | 65 searching for changes |
66 remote: pushing 1 commit: | 66 remote: pushing 1 commit: |
67 remote: 8db3891c220e scratchsecondpart | 67 remote: 8db3891c220e scratchsecondpart |
68 | 68 |
94 adding testpullbycommithash1 | 94 adding testpullbycommithash1 |
95 created new head | 95 created new head |
96 $ hg log -r '.' -T '{node}\n' > ../testpullbycommithash1 | 96 $ hg log -r '.' -T '{node}\n' > ../testpullbycommithash1 |
97 $ echo testpullbycommithash2 > testpullbycommithash2 | 97 $ echo testpullbycommithash2 > testpullbycommithash2 |
98 $ hg ci -Aqm "testpullbycommithash2" | 98 $ hg ci -Aqm "testpullbycommithash2" |
99 $ hg push -r . --to scratch/mybranch -q | 99 $ hg push -r . -B scratch/mybranch -q |
100 | 100 |
101 Create third client and pull by commit hash. | 101 Create third client and pull by commit hash. |
102 Make sure testpullbycommithash2 has not fetched | 102 Make sure testpullbycommithash2 has not fetched |
103 $ cd .. | 103 $ cd .. |
104 $ hg clone ssh://user@dummy/repo client3 -q | 104 $ hg clone ssh://user@dummy/repo client3 -q |
142 | 142 |
143 $ hg up a79b6597f322 | 143 $ hg up a79b6597f322 |
144 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 144 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
145 $ echo scratchontopofpublic > scratchontopofpublic | 145 $ echo scratchontopofpublic > scratchontopofpublic |
146 $ hg ci -Aqm "scratchontopofpublic" | 146 $ hg ci -Aqm "scratchontopofpublic" |
147 $ hg push -r . --to scratch/scratchontopofpublic | 147 $ hg push -r . -B scratch/scratchontopofpublic |
148 pushing to ssh://user@dummy/repo | 148 pushing to ssh://user@dummy/repo |
149 searching for changes | 149 searching for changes |
150 remote: pushing 1 commit: | 150 remote: pushing 1 commit: |
151 remote: c70aee6da07d scratchontopofpublic | 151 remote: c70aee6da07d scratchontopofpublic |
152 $ cd ../client2 | 152 $ cd ../client2 |
298 $ cd ../client | 298 $ cd ../client |
299 $ echo tofillmetadata > tofillmetadata | 299 $ echo tofillmetadata > tofillmetadata |
300 $ hg ci -Aqm "tofillmetadata" | 300 $ hg ci -Aqm "tofillmetadata" |
301 $ hg log -r . -T '{node}\n' | 301 $ hg log -r . -T '{node}\n' |
302 d2b0410d4da084bc534b1d90df0de9eb21583496 | 302 d2b0410d4da084bc534b1d90df0de9eb21583496 |
303 $ hg push -r . --to scratch/fillmetadata/fill | 303 $ hg push -r . -B scratch/fillmetadata/fill |
304 pushing to ssh://user@dummy/repo | 304 pushing to ssh://user@dummy/repo |
305 searching for changes | 305 searching for changes |
306 remote: pushing 6 commits: | 306 remote: pushing 6 commits: |
307 remote: 33910bfe6ffe testpullbycommithash1 | 307 remote: 33910bfe6ffe testpullbycommithash1 |
308 remote: d8fde0ddfc96 testpullbycommithash2 | 308 remote: d8fde0ddfc96 testpullbycommithash2 |