##// END OF EJS Templates
push: pass list of bookmark to `exchange.push`...
Pierre-Yves David -
r22623:cd7e17aa default
parent child Browse files
Show More
@@ -5069,7 +5069,8 b' def push(ui, repo, dest=None, **opts):'
5069 finally:
5069 finally:
5070 del repo._subtoppath
5070 del repo._subtoppath
5071 pushop = exchange.push(repo, other, opts.get('force'), revs=revs,
5071 pushop = exchange.push(repo, other, opts.get('force'), revs=revs,
5072 newbranch=opts.get('new_branch'))
5072 newbranch=opts.get('new_branch'),
5073 bookmarks=opts.get('bookmark', ()))
5073
5074
5074 result = not pushop.cgresult
5075 result = not pushop.cgresult
5075
5076
@@ -61,7 +61,8 b' class pushoperation(object):'
61 afterward.
61 afterward.
62 """
62 """
63
63
64 def __init__(self, repo, remote, force=False, revs=None, newbranch=False):
64 def __init__(self, repo, remote, force=False, revs=None, newbranch=False,
65 bookmarks=()):
65 # repo we push from
66 # repo we push from
66 self.repo = repo
67 self.repo = repo
67 self.ui = repo.ui
68 self.ui = repo.ui
@@ -71,6 +72,8 b' class pushoperation(object):'
71 self.force = force
72 self.force = force
72 # revs to be pushed (None is "all")
73 # revs to be pushed (None is "all")
73 self.revs = revs
74 self.revs = revs
75 # bookmark explicitly pushed
76 self.bookmarks = bookmarks
74 # allow push of new branch
77 # allow push of new branch
75 self.newbranch = newbranch
78 self.newbranch = newbranch
76 # did a local lock get acquired?
79 # did a local lock get acquired?
@@ -145,7 +148,7 b' class pushoperation(object):'
145 else:
148 else:
146 return self.fallbackheads
149 return self.fallbackheads
147
150
148 def push(repo, remote, force=False, revs=None, newbranch=False):
151 def push(repo, remote, force=False, revs=None, newbranch=False, bookmarks=()):
149 '''Push outgoing changesets (limited by revs) from a local
152 '''Push outgoing changesets (limited by revs) from a local
150 repository to remote. Return an integer:
153 repository to remote. Return an integer:
151 - None means nothing to push
154 - None means nothing to push
@@ -154,7 +157,7 b' def push(repo, remote, force=False, revs'
154 we have outgoing changesets but refused to push
157 we have outgoing changesets but refused to push
155 - other values as described by addchangegroup()
158 - other values as described by addchangegroup()
156 '''
159 '''
157 pushop = pushoperation(repo, remote, force, revs, newbranch)
160 pushop = pushoperation(repo, remote, force, revs, newbranch, bookmarks)
158 if pushop.remote.local():
161 if pushop.remote.local():
159 missing = (set(pushop.repo.requirements)
162 missing = (set(pushop.repo.requirements)
160 - pushop.remote.local().supported)
163 - pushop.remote.local().supported)
General Comments 0
You need to be logged in to leave comments. Login now