##// END OF EJS Templates
discovery: rename 'error' to 'errormsg'...
Pierre-Yves David -
r26585:b38d9373 default
parent child Browse files
Show More
@@ -284,7 +284,7 b' def checkheads(repo, remote, outgoing, r'
284 284 # 3. Check for new heads.
285 285 # If there are more heads after the push than before, a suitable
286 286 # error message, depending on unsynced status, is displayed.
287 error = None
287 errormsg = None
288 288 # If there is no obsstore, allfuturecommon won't be used, so no
289 289 # need to compute it.
290 290 if repo.obsstore:
@@ -354,9 +354,9 b' def checkheads(repo, remote, outgoing, r'
354 354 if remoteheads is None:
355 355 if len(newhs) > 1:
356 356 dhs = list(newhs)
357 if error is None:
358 error = (_("push creates new branch '%s' "
359 "with multiple heads") % (branch))
357 if errormsg is None:
358 errormsg = (_("push creates new branch '%s' "
359 "with multiple heads") % (branch))
360 360 hint = _("merge or"
361 361 " see \"hg help push\" for details about"
362 362 " pushing new heads")
@@ -364,17 +364,17 b' def checkheads(repo, remote, outgoing, r'
364 364 # remove bookmarked or existing remote heads from the new heads list
365 365 dhs = sorted(newhs - bookmarkedheads - oldhs)
366 366 if dhs:
367 if error is None:
367 if errormsg is None:
368 368 if branch not in ('default', None):
369 error = _("push creates new remote head %s "
370 "on branch '%s'!") % (short(dhs[0]), branch)
369 errormsg = _("push creates new remote head %s "
370 "on branch '%s'!") % (short(dhs[0]), branch)
371 371 elif repo[dhs[0]].bookmarks():
372 error = _("push creates new remote head %s "
373 "with bookmark '%s'!") % (
374 short(dhs[0]), repo[dhs[0]].bookmarks()[0])
372 errormsg = _("push creates new remote head %s "
373 "with bookmark '%s'!") % (
374 short(dhs[0]), repo[dhs[0]].bookmarks()[0])
375 375 else:
376 error = _("push creates new remote head %s!"
377 ) % short(dhs[0])
376 errormsg = _("push creates new remote head %s!"
377 ) % short(dhs[0])
378 378 if unsyncedheads:
379 379 hint = _("pull and merge or"
380 380 " see \"hg help push\" for details about"
@@ -389,5 +389,5 b' def checkheads(repo, remote, outgoing, r'
389 389 repo.ui.note(_("new remote heads on branch '%s':\n") % branch)
390 390 for h in dhs:
391 391 repo.ui.note((" %s\n") % short(h))
392 if error:
393 raise util.Abort(error, hint=hint)
392 if errormsg:
393 raise util.Abort(errormsg, hint=hint)
General Comments 0
You need to be logged in to leave comments. Login now