Show More
@@ -315,9 +315,6 b' def serverextsetup(ui):' | |||||
315 |
|
315 | |||
316 | def clientextsetup(ui): |
|
316 | def clientextsetup(ui): | |
317 | entry = extensions.wrapcommand(commands.table, 'push', _push) |
|
317 | entry = extensions.wrapcommand(commands.table, 'push', _push) | |
318 | # Don't add the 'to' arg if it already exists |
|
|||
319 | if not any(a for a in entry[1] if a[1] == 'to'): |
|
|||
320 | entry[1].append(('', 'to', '', _('push revs to this bookmark'))) |
|
|||
321 |
|
318 | |||
322 | if not any(a for a in entry[1] if a[1] == 'non-forward-move'): |
|
319 | if not any(a for a in entry[1] if a[1] == 'non-forward-move'): | |
323 | entry[1].append(('', 'non-forward-move', None, |
|
320 | entry[1].append(('', 'non-forward-move', None, | |
@@ -743,7 +740,13 b' def _findcommonincoming(orig, *args, **k' | |||||
743 | return common, True, remoteheads |
|
740 | return common, True, remoteheads | |
744 |
|
741 | |||
745 | def _push(orig, ui, repo, dest=None, *args, **opts): |
|
742 | def _push(orig, ui, repo, dest=None, *args, **opts): | |
746 | bookmark = opts.get('to') or '' |
|
743 | ||
|
744 | bookmark = opts.get('bookmark') | |||
|
745 | # we only support pushing one infinitepush bookmark at once | |||
|
746 | if len(bookmark) == 1: | |||
|
747 | bookmark = bookmark[0] | |||
|
748 | else: | |||
|
749 | bookmark = '' | |||
747 |
|
750 | |||
748 | oldphasemove = None |
|
751 | oldphasemove = None | |
749 | overrides = {(experimental, configbookmark): bookmark} |
|
752 | overrides = {(experimental, configbookmark): bookmark} | |
@@ -759,6 +762,9 b' def _push(orig, ui, repo, dest=None, *ar' | |||||
759 | ui.setconfig(experimental, confignonforwardmove, |
|
762 | ui.setconfig(experimental, confignonforwardmove, | |
760 | opts.get('non_forward_move'), '--non-forward-move') |
|
763 | opts.get('non_forward_move'), '--non-forward-move') | |
761 | if scratchpush: |
|
764 | if scratchpush: | |
|
765 | # this is an infinitepush, we don't want the bookmark to be applied | |||
|
766 | # rather that should be stored in the bundlestore | |||
|
767 | opts['bookmark'] = [] | |||
762 | ui.setconfig(experimental, configscratchpush, True) |
|
768 | ui.setconfig(experimental, configscratchpush, True) | |
763 | oldphasemove = extensions.wrapfunction(exchange, |
|
769 | oldphasemove = extensions.wrapfunction(exchange, | |
764 | '_localphasemove', |
|
770 | '_localphasemove', |
@@ -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 . - |
|
29 | $ hg push -r . -B 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: | |
@@ -119,7 +119,7 b' Push to scratch branch' | |||||
119 | $ cd ../client2 |
|
119 | $ cd ../client2 | |
120 | $ hg up -q scratch/mybranch |
|
120 | $ hg up -q scratch/mybranch | |
121 | $ mkcommit 'new scratch commit' |
|
121 | $ mkcommit 'new scratch commit' | |
122 |
$ hg push -r . - |
|
122 | $ hg push -r . -B scratch/mybranch | |
123 | pushing to ssh://user@dummy/repo |
|
123 | pushing to ssh://user@dummy/repo | |
124 | searching for changes |
|
124 | searching for changes | |
125 | remote: pushing 2 commits: |
|
125 | remote: pushing 2 commits: | |
@@ -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 . - |
|
143 | $ hg push -r . -B 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: | |
@@ -216,7 +216,7 b' Push scratch revision without bookmark w' | |||||
216 |
|
216 | |||
217 | Test with pushrebase |
|
217 | Test with pushrebase | |
218 | $ mkcommit scratchcommitwithpushrebase |
|
218 | $ mkcommit scratchcommitwithpushrebase | |
219 |
$ hg push -r . - |
|
219 | $ hg push -r . -B scratch/mybranch | |
220 | pushing to ssh://user@dummy/repo |
|
220 | pushing to ssh://user@dummy/repo | |
221 | searching for changes |
|
221 | searching for changes | |
222 | remote: pushing 4 commits: |
|
222 | remote: pushing 4 commits: | |
@@ -237,7 +237,7 b' Test with pushrebase' | |||||
237 |
|
237 | |||
238 | Change the order of pushrebase and infinitepush |
|
238 | Change the order of pushrebase and infinitepush | |
239 | $ mkcommit scratchcommitwithpushrebase2 |
|
239 | $ mkcommit scratchcommitwithpushrebase2 | |
240 |
$ hg push -r . - |
|
240 | $ hg push -r . -B scratch/mybranch | |
241 | pushing to ssh://user@dummy/repo |
|
241 | pushing to ssh://user@dummy/repo | |
242 | searching for changes |
|
242 | searching for changes | |
243 | remote: pushing 5 commits: |
|
243 | remote: pushing 5 commits: | |
@@ -300,7 +300,7 b' Non-fastforward scratch bookmark push' | |||||
300 | $ scratchbookmarks |
|
300 | $ scratchbookmarks | |
301 | scratch/anotherbranch 1de1d7d92f8965260391d0513fe8a8d5973d3042 |
|
301 | scratch/anotherbranch 1de1d7d92f8965260391d0513fe8a8d5973d3042 | |
302 | scratch/mybranch 6c10d49fe92751666c40263f96721b918170d3da |
|
302 | scratch/mybranch 6c10d49fe92751666c40263f96721b918170d3da | |
303 |
$ hg push -r . - |
|
303 | $ hg push -r . -B scratch/mybranch | |
304 | pushing to ssh://user@dummy/repo |
|
304 | pushing to ssh://user@dummy/repo | |
305 | searching for changes |
|
305 | searching for changes | |
306 | remote: non-forward push |
|
306 | remote: non-forward push | |
@@ -308,7 +308,7 b' Non-fastforward scratch bookmark push' | |||||
308 | abort: push failed on remote |
|
308 | abort: push failed on remote | |
309 | [255] |
|
309 | [255] | |
310 |
|
310 | |||
311 |
$ hg push -r . - |
|
311 | $ hg push -r . -B scratch/mybranch --non-forward-move | |
312 | pushing to ssh://user@dummy/repo |
|
312 | pushing to ssh://user@dummy/repo | |
313 | searching for changes |
|
313 | searching for changes | |
314 | remote: pushing 5 commits: |
|
314 | remote: pushing 5 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 . - |
|
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: | |
@@ -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 . - |
|
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: | |
@@ -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 . - |
|
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 | |
@@ -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 . - |
|
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: | |
@@ -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 . - |
|
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: |
General Comments 0
You need to be logged in to leave comments.
Login now