Mercurial > hg
comparison hgext/convert/convcmd.py @ 41418:26761665bdfe
convert: print exception message directly
Otherwise the default repr() implementation will b'' prefix the
returned str on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5729
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 26 Jan 2019 16:53:17 -0800 |
parents | 65d1d7da63d1 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
41417:5c73441a47e5 | 41418:26761665bdfe |
---|---|
121 return source(ui, name, path, revs), sortmode | 121 return source(ui, name, path, revs), sortmode |
122 except (NoRepo, MissingTool) as inst: | 122 except (NoRepo, MissingTool) as inst: |
123 exceptions.append(inst) | 123 exceptions.append(inst) |
124 if not ui.quiet: | 124 if not ui.quiet: |
125 for inst in exceptions: | 125 for inst in exceptions: |
126 ui.write("%s\n" % pycompat.bytestr(inst)) | 126 ui.write("%s\n" % pycompat.bytestr(inst.args[0])) |
127 raise error.Abort(_('%s: missing or unsupported repository') % path) | 127 raise error.Abort(_('%s: missing or unsupported repository') % path) |
128 | 128 |
129 def convertsink(ui, path, type): | 129 def convertsink(ui, path, type): |
130 if type and type not in [s[0] for s in sink_converters]: | 130 if type and type not in [s[0] for s in sink_converters]: |
131 raise error.Abort(_('%s: invalid destination repository type') % type) | 131 raise error.Abort(_('%s: invalid destination repository type') % type) |