equal
deleted
inserted
replaced
21 isremotebooksenabled = common.isremotebooksenabled |
21 isremotebooksenabled = common.isremotebooksenabled |
22 |
22 |
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, create): |
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 |
30 if scratchbranchparttype not in bundle2.bundle2caps(peer): |
30 if scratchbranchparttype not in bundle2.bundle2caps(peer): |
31 raise error.Abort(_('no server support for %r') % scratchbranchparttype) |
31 raise error.Abort(_('no server support for %r') % scratchbranchparttype) |
47 params['bookmark'] = bookmark |
47 params['bookmark'] = bookmark |
48 # 'prevbooknode' is necessary for pushkey reply part |
48 # 'prevbooknode' is necessary for pushkey reply part |
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 |
57 # Do not send pushback bundle2 part with bookmarks if remotenames extension |
55 # Do not send pushback bundle2 part with bookmarks if remotenames extension |
58 # is enabled. It will be handled manually in `_push()` |
56 # is enabled. It will be handled manually in `_push()` |