Show More
@@ -21,7 +21,7 b' class pushoperation(object):' | |||||
21 | afterward. |
|
21 | afterward. | |
22 | """ |
|
22 | """ | |
23 |
|
23 | |||
24 | def __init__(self, repo, remote, force=False, revs=None): |
|
24 | def __init__(self, repo, remote, force=False, revs=None, newbranch=False): | |
25 | # repo we push from |
|
25 | # repo we push from | |
26 | self.repo = repo |
|
26 | self.repo = repo | |
27 | self.ui = repo.ui |
|
27 | self.ui = repo.ui | |
@@ -31,6 +31,8 b' class pushoperation(object):' | |||||
31 | self.force = force |
|
31 | self.force = force | |
32 | # revs to be pushed (None is "all") |
|
32 | # revs to be pushed (None is "all") | |
33 | self.revs = revs |
|
33 | self.revs = revs | |
|
34 | # allow push of new branch | |||
|
35 | self.newbranch = newbranch | |||
34 |
|
36 | |||
35 | def push(repo, remote, force=False, revs=None, newbranch=False): |
|
37 | def push(repo, remote, force=False, revs=None, newbranch=False): | |
36 | '''Push outgoing changesets (limited by revs) from a local |
|
38 | '''Push outgoing changesets (limited by revs) from a local | |
@@ -41,7 +43,7 b' def push(repo, remote, force=False, revs' | |||||
41 | we have outgoing changesets but refused to push |
|
43 | we have outgoing changesets but refused to push | |
42 | - other values as described by addchangegroup() |
|
44 | - other values as described by addchangegroup() | |
43 | ''' |
|
45 | ''' | |
44 | pushop = pushoperation(repo, remote, force, revs) |
|
46 | pushop = pushoperation(repo, remote, force, revs, newbranch) | |
45 | if pushop.remote.local(): |
|
47 | if pushop.remote.local(): | |
46 | missing = (set(pushop.repo.requirements) |
|
48 | missing = (set(pushop.repo.requirements) | |
47 | - pushop.remote.local().supported) |
|
49 | - pushop.remote.local().supported) | |
@@ -134,7 +136,7 b' def push(repo, remote, force=False, revs' | |||||
134 | ctx)) |
|
136 | ctx)) | |
135 | newbm = pushop.ui.configlist('bookmarks', 'pushing') |
|
137 | newbm = pushop.ui.configlist('bookmarks', 'pushing') | |
136 | discovery.checkheads(unfi, pushop.remote, outgoing, |
|
138 | discovery.checkheads(unfi, pushop.remote, outgoing, | |
137 | remoteheads, newbranch, |
|
139 | remoteheads, pushop.newbranch, | |
138 | bool(inc), newbm) |
|
140 | bool(inc), newbm) | |
139 |
|
141 | |||
140 | # TODO: get bundlecaps from remote |
|
142 | # TODO: get bundlecaps from remote |
General Comments 0
You need to be logged in to leave comments.
Login now