##// END OF EJS Templates
exchange: pass pushop to discovery.checkheads...
Ryan McElroy -
r26935:c4a7bbc7 default
parent child Browse files
Show More
@@ -255,12 +255,22 b' def _nowarnheads(repo, remote, newbookma'
255 255
256 256 return bookmarkedheads
257 257
258 def checkheads(repo, remote, outgoing, remoteheads, newbranch=False, inc=False,
259 newbookmarks=[]):
258 def checkheads(pushop):
260 259 """Check that a push won't add any outgoing head
261 260
262 261 raise Abort error and display ui message as needed.
263 262 """
263
264 repo = pushop.repo.unfiltered()
265 remote = pushop.remote
266 outgoing = pushop.outgoing
267 remoteheads = pushop.remoteheads
268 newbranch = pushop.newbranch
269 inc = bool(pushop.incoming)
270
271 # internal config: bookmarks.pushing
272 newbookmarks = pushop.ui.configlist('bookmarks', 'pushing')
273
264 274 # Check for each named branch if we're creating new remote heads.
265 275 # To be a remote head after push, node must be either:
266 276 # - unknown locally
@@ -571,13 +571,7 b' def _pushcheckoutgoing(pushop):'
571 571 elif ctx.troubled():
572 572 raise error.Abort(mst[ctx.troubles()[0]] % ctx)
573 573
574 # internal config: bookmarks.pushing
575 newbm = pushop.ui.configlist('bookmarks', 'pushing')
576 discovery.checkheads(unfi, pushop.remote, outgoing,
577 pushop.remoteheads,
578 pushop.newbranch,
579 bool(pushop.incoming),
580 newbm)
574 discovery.checkheads(pushop)
581 575 return True
582 576
583 577 # List of names of steps to perform for an outgoing bundle2, order matters.
General Comments 0
You need to be logged in to leave comments. Login now