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