Show More
@@ -315,9 +315,6 def serverextsetup(ui): | |||
|
315 | 315 | |
|
316 | 316 | def clientextsetup(ui): |
|
317 | 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 | 319 | if not any(a for a in entry[1] if a[1] == 'non-forward-move'): |
|
323 | 320 | entry[1].append(('', 'non-forward-move', None, |
@@ -743,7 +740,13 def _findcommonincoming(orig, *args, **k | |||
|
743 | 740 | return common, True, remoteheads |
|
744 | 741 | |
|
745 | 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 | 751 | oldphasemove = None |
|
749 | 752 | overrides = {(experimental, configbookmark): bookmark} |
@@ -759,6 +762,9 def _push(orig, ui, repo, dest=None, *ar | |||
|
759 | 762 | ui.setconfig(experimental, confignonforwardmove, |
|
760 | 763 | opts.get('non_forward_move'), '--non-forward-move') |
|
761 | 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 | 768 | ui.setconfig(experimental, configscratchpush, True) |
|
763 | 769 | oldphasemove = extensions.wrapfunction(exchange, |
|
764 | 770 | '_localphasemove', |
@@ -26,7 +26,7 the history but is stored on disk | |||
|
26 | 26 | remote: adding file changes |
|
27 | 27 | remote: added 1 changesets with 1 changes to 1 files |
|
28 | 28 | $ mkcommit scratchcommit |
|
29 |
$ hg push -r . - |
|
|
29 | $ hg push -r . -B scratch/mybranch | |
|
30 | 30 | pushing to ssh://user@dummy/repo |
|
31 | 31 | searching for changes |
|
32 | 32 | remote: pushing 1 commit: |
@@ -119,7 +119,7 Push to scratch branch | |||
|
119 | 119 | $ cd ../client2 |
|
120 | 120 | $ hg up -q scratch/mybranch |
|
121 | 121 | $ mkcommit 'new scratch commit' |
|
122 |
$ hg push -r . - |
|
|
122 | $ hg push -r . -B scratch/mybranch | |
|
123 | 123 | pushing to ssh://user@dummy/repo |
|
124 | 124 | searching for changes |
|
125 | 125 | remote: pushing 2 commits: |
@@ -140,7 +140,7 Push to scratch branch | |||
|
140 | 140 | scratch/mybranch 1de1d7d92f8965260391d0513fe8a8d5973d3042 |
|
141 | 141 | |
|
142 | 142 | Push scratch bookmark with no new revs |
|
143 |
$ hg push -r . - |
|
|
143 | $ hg push -r . -B scratch/anotherbranch | |
|
144 | 144 | pushing to ssh://user@dummy/repo |
|
145 | 145 | searching for changes |
|
146 | 146 | remote: pushing 2 commits: |
@@ -216,7 +216,7 Push scratch revision without bookmark w | |||
|
216 | 216 | |
|
217 | 217 | Test with pushrebase |
|
218 | 218 | $ mkcommit scratchcommitwithpushrebase |
|
219 |
$ hg push -r . - |
|
|
219 | $ hg push -r . -B scratch/mybranch | |
|
220 | 220 | pushing to ssh://user@dummy/repo |
|
221 | 221 | searching for changes |
|
222 | 222 | remote: pushing 4 commits: |
@@ -237,7 +237,7 Test with pushrebase | |||
|
237 | 237 | |
|
238 | 238 | Change the order of pushrebase and infinitepush |
|
239 | 239 | $ mkcommit scratchcommitwithpushrebase2 |
|
240 |
$ hg push -r . - |
|
|
240 | $ hg push -r . -B scratch/mybranch | |
|
241 | 241 | pushing to ssh://user@dummy/repo |
|
242 | 242 | searching for changes |
|
243 | 243 | remote: pushing 5 commits: |
@@ -300,7 +300,7 Non-fastforward scratch bookmark push | |||
|
300 | 300 | $ scratchbookmarks |
|
301 | 301 | scratch/anotherbranch 1de1d7d92f8965260391d0513fe8a8d5973d3042 |
|
302 | 302 | scratch/mybranch 6c10d49fe92751666c40263f96721b918170d3da |
|
303 |
$ hg push -r . - |
|
|
303 | $ hg push -r . -B scratch/mybranch | |
|
304 | 304 | pushing to ssh://user@dummy/repo |
|
305 | 305 | searching for changes |
|
306 | 306 | remote: non-forward push |
@@ -308,7 +308,7 Non-fastforward scratch bookmark push | |||
|
308 | 308 | abort: push failed on remote |
|
309 | 309 | [255] |
|
310 | 310 | |
|
311 |
$ hg push -r . - |
|
|
311 | $ hg push -r . -B scratch/mybranch --non-forward-move | |
|
312 | 312 | pushing to ssh://user@dummy/repo |
|
313 | 313 | searching for changes |
|
314 | 314 | remote: pushing 5 commits: |
@@ -49,7 +49,7 Create two new scratch bookmarks | |||
|
49 | 49 | $ hg ci -Am "scratchfirstpart" |
|
50 | 50 | adding scratchfirstpart |
|
51 | 51 | created new head |
|
52 |
$ hg push -r . - |
|
|
52 | $ hg push -r . -B scratch/firstpart | |
|
53 | 53 | pushing to ssh://user@dummy/repo |
|
54 | 54 | searching for changes |
|
55 | 55 | remote: pushing 1 commit: |
@@ -60,7 +60,7 Create two new scratch bookmarks | |||
|
60 | 60 | $ hg ci -Am "scratchsecondpart" |
|
61 | 61 | adding scratchsecondpart |
|
62 | 62 | created new head |
|
63 |
$ hg push -r . - |
|
|
63 | $ hg push -r . -B scratch/secondpart | |
|
64 | 64 | pushing to ssh://user@dummy/repo |
|
65 | 65 | searching for changes |
|
66 | 66 | remote: pushing 1 commit: |
@@ -96,7 +96,7 Make two commits to the scratch branch | |||
|
96 | 96 | $ hg log -r '.' -T '{node}\n' > ../testpullbycommithash1 |
|
97 | 97 | $ echo testpullbycommithash2 > testpullbycommithash2 |
|
98 | 98 | $ hg ci -Aqm "testpullbycommithash2" |
|
99 |
$ hg push -r . - |
|
|
99 | $ hg push -r . -B scratch/mybranch -q | |
|
100 | 100 | |
|
101 | 101 | Create third client and pull by commit hash. |
|
102 | 102 | Make sure testpullbycommithash2 has not fetched |
@@ -144,7 +144,7 Make sure phase on the client is public. | |||
|
144 | 144 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
145 | 145 | $ echo scratchontopofpublic > scratchontopofpublic |
|
146 | 146 | $ hg ci -Aqm "scratchontopofpublic" |
|
147 |
$ hg push -r . - |
|
|
147 | $ hg push -r . -B scratch/scratchontopofpublic | |
|
148 | 148 | pushing to ssh://user@dummy/repo |
|
149 | 149 | searching for changes |
|
150 | 150 | remote: pushing 1 commit: |
@@ -300,7 +300,7 Test infinitepush.fillmetadatabranchpatt | |||
|
300 | 300 | $ hg ci -Aqm "tofillmetadata" |
|
301 | 301 | $ hg log -r . -T '{node}\n' |
|
302 | 302 | d2b0410d4da084bc534b1d90df0de9eb21583496 |
|
303 |
$ hg push -r . - |
|
|
303 | $ hg push -r . -B scratch/fillmetadata/fill | |
|
304 | 304 | pushing to ssh://user@dummy/repo |
|
305 | 305 | searching for changes |
|
306 | 306 | remote: pushing 6 commits: |
General Comments 0
You need to be logged in to leave comments.
Login now