Show More
@@ -175,9 +175,6 b" configitem('infinitepush', 'metadatafile" | |||||
175 | configitem('experimental', 'server-bundlestore-bookmark', |
|
175 | configitem('experimental', 'server-bundlestore-bookmark', | |
176 | default='', |
|
176 | default='', | |
177 | ) |
|
177 | ) | |
178 | configitem('experimental', 'server-bundlestore-create', |
|
|||
179 | default='', |
|
|||
180 | ) |
|
|||
181 | configitem('experimental', 'infinitepush-scratchpush', |
|
178 | configitem('experimental', 'infinitepush-scratchpush', | |
182 | default=False, |
|
179 | default=False, | |
183 | ) |
|
180 | ) | |
@@ -187,7 +184,6 b" configitem('experimental', 'non-forward-" | |||||
187 |
|
184 | |||
188 | experimental = 'experimental' |
|
185 | experimental = 'experimental' | |
189 | configbookmark = 'server-bundlestore-bookmark' |
|
186 | configbookmark = 'server-bundlestore-bookmark' | |
190 | configcreate = 'server-bundlestore-create' |
|
|||
191 | configscratchpush = 'infinitepush-scratchpush' |
|
187 | configscratchpush = 'infinitepush-scratchpush' | |
192 | confignonforwardmove = 'non-forward-move' |
|
188 | confignonforwardmove = 'non-forward-move' | |
193 |
|
189 | |||
@@ -328,10 +324,6 b' def clientextsetup(ui):' | |||||
328 | _('allows moving a remote bookmark to an ' |
|
324 | _('allows moving a remote bookmark to an ' | |
329 | 'arbitrary place'))) |
|
325 | 'arbitrary place'))) | |
330 |
|
326 | |||
331 | if not any(a for a in entry[1] if a[1] == 'create'): |
|
|||
332 | entry[1].append( |
|
|||
333 | ('', 'create', None, _('create a new remote bookmark'))) |
|
|||
334 |
|
||||
335 | entry[1].append( |
|
327 | entry[1].append( | |
336 | ('', 'bundle-store', None, |
|
328 | ('', 'bundle-store', None, | |
337 | _('force push to go to bundle store (EXPERIMENTAL)'))) |
|
329 | _('force push to go to bundle store (EXPERIMENTAL)'))) | |
@@ -752,11 +744,9 b' def _findcommonincoming(orig, *args, **k' | |||||
752 |
|
744 | |||
753 | def _push(orig, ui, repo, dest=None, *args, **opts): |
|
745 | def _push(orig, ui, repo, dest=None, *args, **opts): | |
754 | bookmark = opts.get('to') or '' |
|
746 | bookmark = opts.get('to') or '' | |
755 | create = opts.get('create') or False |
|
|||
756 |
|
747 | |||
757 | oldphasemove = None |
|
748 | oldphasemove = None | |
758 |
overrides = {(experimental, configbookmark): bookmark |
|
749 | overrides = {(experimental, configbookmark): bookmark} | |
759 | (experimental, configcreate): create} |
|
|||
760 |
|
750 | |||
761 | with ui.configoverride(overrides, 'infinitepush'): |
|
751 | with ui.configoverride(overrides, 'infinitepush'): | |
762 | scratchpush = opts.get('bundle_store') |
|
752 | scratchpush = opts.get('bundle_store') | |
@@ -839,7 +829,6 b' def _phasemove(orig, pushop, nodes, phas' | |||||
839 | @exchange.b2partsgenerator(scratchbranchparttype) |
|
829 | @exchange.b2partsgenerator(scratchbranchparttype) | |
840 | def partgen(pushop, bundler): |
|
830 | def partgen(pushop, bundler): | |
841 | bookmark = pushop.ui.config(experimental, configbookmark) |
|
831 | bookmark = pushop.ui.config(experimental, configbookmark) | |
842 | create = pushop.ui.configbool(experimental, configcreate) |
|
|||
843 | scratchpush = pushop.ui.configbool(experimental, configscratchpush) |
|
832 | scratchpush = pushop.ui.configbool(experimental, configscratchpush) | |
844 | if 'changesets' in pushop.stepsdone or not scratchpush: |
|
833 | if 'changesets' in pushop.stepsdone or not scratchpush: | |
845 | return |
|
834 | return | |
@@ -865,8 +854,7 b' def partgen(pushop, bundler):' | |||||
865 | pushop.outgoing, |
|
854 | pushop.outgoing, | |
866 | nonforwardmove, |
|
855 | nonforwardmove, | |
867 | pushop.ui, |
|
856 | pushop.ui, | |
868 |
bookmark |
|
857 | bookmark) | |
869 | create) |
|
|||
870 |
|
858 | |||
871 | for scratchpart in scratchparts: |
|
859 | for scratchpart in scratchparts: | |
872 | bundler.addpart(scratchpart) |
|
860 | bundler.addpart(scratchpart) | |
@@ -1028,15 +1016,10 b' def storebundle(op, params, bundlefile):' | |||||
1028 |
|
1016 | |||
1029 | bookmark = params.get('bookmark') |
|
1017 | bookmark = params.get('bookmark') | |
1030 | bookprevnode = params.get('bookprevnode', '') |
|
1018 | bookprevnode = params.get('bookprevnode', '') | |
1031 | create = params.get('create') |
|
|||
1032 | force = params.get('force') |
|
1019 | force = params.get('force') | |
1033 |
|
1020 | |||
1034 | if bookmark: |
|
1021 | if bookmark: | |
1035 | oldnode = index.getnode(bookmark) |
|
1022 | oldnode = index.getnode(bookmark) | |
1036 |
|
||||
1037 | if not oldnode and not create: |
|
|||
1038 | raise error.Abort("unknown bookmark %s" % bookmark, |
|
|||
1039 | hint="use --create if you want to create one") |
|
|||
1040 | else: |
|
1023 | else: | |
1041 | oldnode = None |
|
1024 | oldnode = None | |
1042 | bundleheads = bundle.revs('heads(bundle())') |
|
1025 | bundleheads = bundle.revs('heads(bundle())') | |
@@ -1110,7 +1093,7 b' def storebundle(op, params, bundlefile):' | |||||
1110 | bundle.close() |
|
1093 | bundle.close() | |
1111 |
|
1094 | |||
1112 | @bundle2.parthandler(scratchbranchparttype, |
|
1095 | @bundle2.parthandler(scratchbranchparttype, | |
1113 |
('bookmark', 'bookprevnode' |
|
1096 | ('bookmark', 'bookprevnode', 'force', | |
1114 | 'pushbackbookmarks', 'cgversion')) |
|
1097 | 'pushbackbookmarks', 'cgversion')) | |
1115 | def bundle2scratchbranch(op, part): |
|
1098 | def bundle2scratchbranch(op, part): | |
1116 | '''unbundle a bundle2 part containing a changegroup to store''' |
|
1099 | '''unbundle a bundle2 part containing a changegroup to store''' |
@@ -23,7 +23,7 b' isremotebooksenabled = common.isremotebo' | |||||
23 | scratchbranchparttype = 'b2x:infinitepush' |
|
23 | scratchbranchparttype = 'b2x:infinitepush' | |
24 |
|
24 | |||
25 | def getscratchbranchparts(repo, peer, outgoing, confignonforwardmove, |
|
25 | def getscratchbranchparts(repo, peer, outgoing, confignonforwardmove, | |
26 |
ui, bookmark |
|
26 | ui, bookmark): | |
27 | if not outgoing.missing: |
|
27 | if not outgoing.missing: | |
28 | raise error.Abort(_('no commits to push')) |
|
28 | raise error.Abort(_('no commits to push')) | |
29 |
|
29 | |||
@@ -49,8 +49,6 b' def getscratchbranchparts(repo, peer, ou' | |||||
49 | params['bookprevnode'] = '' |
|
49 | params['bookprevnode'] = '' | |
50 | if bookmark in repo: |
|
50 | if bookmark in repo: | |
51 | params['bookprevnode'] = repo[bookmark].hex() |
|
51 | params['bookprevnode'] = repo[bookmark].hex() | |
52 | if create: |
|
|||
53 | params['create'] = '1' |
|
|||
54 | if confignonforwardmove: |
|
52 | if confignonforwardmove: | |
55 | params['force'] = '1' |
|
53 | params['force'] = '1' | |
56 |
|
54 |
@@ -18,7 +18,7 b' the history but is stored on disk' | |||||
18 | $ hg clone ssh://user@dummy/repo client -q |
|
18 | $ hg clone ssh://user@dummy/repo client -q | |
19 | $ cd client |
|
19 | $ cd client | |
20 | $ mkcommit initialcommit |
|
20 | $ mkcommit initialcommit | |
21 |
$ hg push -r . |
|
21 | $ hg push -r . | |
22 | pushing to ssh://user@dummy/repo |
|
22 | pushing to ssh://user@dummy/repo | |
23 | searching for changes |
|
23 | searching for changes | |
24 | remote: adding changesets |
|
24 | remote: adding changesets | |
@@ -26,7 +26,7 b' the history but is stored on disk' | |||||
26 | remote: adding file changes |
|
26 | remote: adding file changes | |
27 | remote: added 1 changesets with 1 changes to 1 files |
|
27 | remote: added 1 changesets with 1 changes to 1 files | |
28 | $ mkcommit scratchcommit |
|
28 | $ mkcommit scratchcommit | |
29 |
$ hg push -r . --to scratch/mybranch |
|
29 | $ hg push -r . --to scratch/mybranch | |
30 | pushing to ssh://user@dummy/repo |
|
30 | pushing to ssh://user@dummy/repo | |
31 | searching for changes |
|
31 | searching for changes | |
32 | remote: pushing 1 commit: |
|
32 | remote: pushing 1 commit: | |
@@ -140,7 +140,7 b' Push to scratch branch' | |||||
140 | scratch/mybranch 1de1d7d92f8965260391d0513fe8a8d5973d3042 |
|
140 | scratch/mybranch 1de1d7d92f8965260391d0513fe8a8d5973d3042 | |
141 |
|
141 | |||
142 | Push scratch bookmark with no new revs |
|
142 | Push scratch bookmark with no new revs | |
143 |
$ hg push -r . --to scratch/anotherbranch |
|
143 | $ hg push -r . --to scratch/anotherbranch | |
144 | pushing to ssh://user@dummy/repo |
|
144 | pushing to ssh://user@dummy/repo | |
145 | searching for changes |
|
145 | searching for changes | |
146 | remote: pushing 2 commits: |
|
146 | remote: pushing 2 commits: |
@@ -49,7 +49,7 b' Create two new scratch bookmarks' | |||||
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 . --to 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: | |
@@ -60,7 +60,7 b' Create two new scratch bookmarks' | |||||
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 . --to 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: | |
@@ -96,7 +96,7 b' Make two commits to the scratch branch' | |||||
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 |
|
99 | $ hg push -r . --to 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 | |
@@ -144,7 +144,7 b' Make sure phase on the client is public.' | |||||
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 . --to 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: | |
@@ -300,7 +300,7 b' Test infinitepush.fillmetadatabranchpatt' | |||||
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 . --to 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: |
General Comments 0
You need to be logged in to leave comments.
Login now