Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 36452:04c319a07c7b
py3: hunt down str(exception) instances and use util.forcebytestr
I decided to grep around for \sstr\( and see what low-hanging fruit
that showed me. This was part of that hunt. That grep pattern still
has some things worth exploring.
Differential Revision: https://phab.mercurial-scm.org/D2440
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 25 Feb 2018 23:08:41 -0500 |
parents | 199443c55463 |
children | ab5f18a9dcac |
comparison
equal
deleted
inserted
replaced
36451:1df7e7b8558e | 36452:04c319a07c7b |
---|---|
3897 return | 3897 return |
3898 if optupdate: | 3898 if optupdate: |
3899 try: | 3899 try: |
3900 return hg.updatetotally(ui, repo, checkout, brev) | 3900 return hg.updatetotally(ui, repo, checkout, brev) |
3901 except error.UpdateAbort as inst: | 3901 except error.UpdateAbort as inst: |
3902 msg = _("not updating: %s") % str(inst) | 3902 msg = _("not updating: %s") % util.forcebytestr(inst) |
3903 hint = inst.hint | 3903 hint = inst.hint |
3904 raise error.UpdateAbort(msg, hint=hint) | 3904 raise error.UpdateAbort(msg, hint=hint) |
3905 if modheads > 1: | 3905 if modheads > 1: |
3906 currentbranchheads = len(repo.branchheads()) | 3906 currentbranchheads = len(repo.branchheads()) |
3907 if currentbranchheads == modheads: | 3907 if currentbranchheads == modheads: |