Mercurial > dotfiles
diff unixSoft/bin/hgimp @ 521:6cc5a0550281
tools: port hg utility scripts to python 3
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 14 Jul 2022 14:09:04 -0400 |
parents | 957632211aa3 |
children |
line wrap: on
line diff
--- a/unixSoft/bin/hgimp +++ b/unixSoft/bin/hgimp @@ -29,11 +29,11 @@ def main(argv): if n.startswith(name): c.append(n) if not c: - print 'abort: no repo named %s' % name + print('abort: no repo named %s' % name) sys.exit(1) elif len(c) != 1: - print 'abort: ambiguous repo name %s matches %s' % ( - name, ', '.join(c)) + print('abort: ambiguous repo name %s matches %s' % ( + name, ', '.join(c))) sys.exit(1) repo = _MAP[c[0]] importargs = ['hg', '-R', repo, 'import', '--obsolete'] @@ -41,7 +41,7 @@ def main(argv): importargs.append('--partial') importargs.append('-') hg = subprocess.Popen(importargs, stdin=subprocess.PIPE) - hg.stdin.write(sys.stdin.read()) + hg.stdin.write(sys.stdin.buffer.read()) hg.stdin.close() hg.wait() sys.exit(hg.returncode)