Mercurial > hg
comparison mercurial/destutil.py @ 28683:d0210a35c81a
destutil: make messages at updating to the closed head usual form
This patch makes messages at updating to the closed head usual form
for Mercurial as below:
one line description of the problem with no period
(a suggestion about how to move forward or get more info)
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 29 Mar 2016 23:59:32 +0900 |
parents | 3f9e25a42e69 |
children | 1ace17e1e160 |
comparison
equal
deleted
inserted
replaced
28682:2e5be704bc96 | 28683:d0210a35c81a |
---|---|
395 # x 0 there is only one non-closed branch head | 395 # x 0 there is only one non-closed branch head |
396 # N there are some non-closed branch heads | 396 # N there are some non-closed branch heads |
397 # ========= ========== | 397 # ========= ========== |
398 otherheads = repo.revs('%ln - parents()', heads) | 398 otherheads = repo.revs('%ln - parents()', heads) |
399 if repo['.'].closesbranch(): | 399 if repo['.'].closesbranch(): |
400 ui.status(_('updated to a closed branch head, ' | 400 ui.status(_('no open descendant heads on branch "%s", ' |
401 'because all descendant heads are closed.\n' | 401 'updating to a closed head\n') % |
402 'beware of re-opening closed head ' | 402 (currentbranch)) |
403 'by subsequent commit here.\n')) | |
404 if otherheads: | 403 if otherheads: |
405 ui.status(_('%i other heads for branch "%s"\n') % | 404 ui.status(_('(committing will reopen the head, ' |
406 (len(otherheads), currentbranch)) | 405 'use `hg heads .` to see %i other heads)\n') % |
406 (len(otherheads))) | |
407 else: | 407 else: |
408 ui.status(_('all heads for branch "%s" are closed.\n') % | 408 ui.status(_('(committing will reopen branch "%s")\n') % |
409 currentbranch) | 409 (currentbranch)) |
410 elif otherheads: | 410 elif otherheads: |
411 ui.status(_('%i other heads for branch "%s"\n') % | 411 ui.status(_('%i other heads for branch "%s"\n') % |
412 (len(otherheads), currentbranch)) | 412 (len(otherheads), currentbranch)) |
413 | 413 |
414 def statusotherdests(ui, repo): | 414 def statusotherdests(ui, repo): |