##// 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 return bookmarkedheads
256 return bookmarkedheads
257
257
258 def checkheads(repo, remote, outgoing, remoteheads, newbranch=False, inc=False,
258 def checkheads(pushop):
259 newbookmarks=[]):
260 """Check that a push won't add any outgoing head
259 """Check that a push won't add any outgoing head
261
260
262 raise Abort error and display ui message as needed.
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 # Check for each named branch if we're creating new remote heads.
274 # Check for each named branch if we're creating new remote heads.
265 # To be a remote head after push, node must be either:
275 # To be a remote head after push, node must be either:
266 # - unknown locally
276 # - unknown locally
@@ -571,13 +571,7 b' def _pushcheckoutgoing(pushop):'
571 elif ctx.troubled():
571 elif ctx.troubled():
572 raise error.Abort(mst[ctx.troubles()[0]] % ctx)
572 raise error.Abort(mst[ctx.troubles()[0]] % ctx)
573
573
574 # internal config: bookmarks.pushing
574 discovery.checkheads(pushop)
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)
581 return True
575 return True
582
576
583 # List of names of steps to perform for an outgoing bundle2, order matters.
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