342 # if repo.obsstore == False --> no obsolete |
342 # if repo.obsstore == False --> no obsolete |
343 # then, save the iteration |
343 # then, save the iteration |
344 if unfi.obsstore: |
344 if unfi.obsstore: |
345 # this message are here for 80 char limit reason |
345 # this message are here for 80 char limit reason |
346 mso = _("push includes obsolete changeset: %s!") |
346 mso = _("push includes obsolete changeset: %s!") |
347 mst = "push includes %s changeset: %s!" |
347 mst = {"unstable": _("push includes unstable changeset: %s!"), |
348 # plain versions for i18n tool to detect them |
348 "bumped": _("push includes bumped changeset: %s!"), |
349 _("push includes unstable changeset: %s!") |
349 "divergent": _("push includes divergent changeset: %s!")} |
350 _("push includes bumped changeset: %s!") |
|
351 _("push includes divergent changeset: %s!") |
|
352 # If we are to push if there is at least one |
350 # If we are to push if there is at least one |
353 # obsolete or unstable changeset in missing, at |
351 # obsolete or unstable changeset in missing, at |
354 # least one of the missinghead will be obsolete or |
352 # least one of the missinghead will be obsolete or |
355 # unstable. So checking heads only is ok |
353 # unstable. So checking heads only is ok |
356 for node in outgoing.missingheads: |
354 for node in outgoing.missingheads: |
357 ctx = unfi[node] |
355 ctx = unfi[node] |
358 if ctx.obsolete(): |
356 if ctx.obsolete(): |
359 raise util.Abort(mso % ctx) |
357 raise util.Abort(mso % ctx) |
360 elif ctx.troubled(): |
358 elif ctx.troubled(): |
361 raise util.Abort(_(mst) |
359 raise util.Abort(mst[ctx.troubles()[0]] % ctx) |
362 % (ctx.troubles()[0], |
|
363 ctx)) |
|
364 newbm = pushop.ui.configlist('bookmarks', 'pushing') |
360 newbm = pushop.ui.configlist('bookmarks', 'pushing') |
365 discovery.checkheads(unfi, pushop.remote, outgoing, |
361 discovery.checkheads(unfi, pushop.remote, outgoing, |
366 pushop.remoteheads, |
362 pushop.remoteheads, |
367 pushop.newbranch, |
363 pushop.newbranch, |
368 bool(pushop.incoming), |
364 bool(pushop.incoming), |