Mercurial > hg
changeset 41259:194e43c2bac9
remotefilelog: fix some bytes/str portability issues for Python 3
A few remotefilelog tests still fail on Python 3, but it's a much better story
now.
Differential Revision: https://phab.mercurial-scm.org/D5609
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 16 Jan 2019 11:03:04 -0500 |
parents | a6b98c95bcf0 |
children | c146651a78e1 |
files | hgext/remotefilelog/basestore.py hgext/remotefilelog/debugcommands.py |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/remotefilelog/basestore.py Wed Jan 16 11:02:20 2019 -0500 +++ b/hgext/remotefilelog/basestore.py Wed Jan 16 11:03:04 2019 -0500 @@ -383,7 +383,7 @@ removedexcess += oldpathstat.st_size progress.complete() - ui.status(_("finished: removed %s of %s files (%0.2f GB to %0.2f GB)\n") + ui.status(_("finished: removed %d of %d files (%0.2f GB to %0.2f GB)\n") % (removed, count, float(originalsize) / 1024.0 / 1024.0 / 1024.0, float(size) / 1024.0 / 1024.0 / 1024.0))
--- a/hgext/remotefilelog/debugcommands.py Wed Jan 16 11:02:20 2019 -0500 +++ b/hgext/remotefilelog/debugcommands.py Wed Jan 16 11:03:04 2019 -0500 @@ -242,8 +242,8 @@ ui.write(("Total:%s%s %s (%s)\n") % ( "".ljust(2 * hashlen - len("Total:")), - str(totaldeltasize).ljust(12), - str(totalblobsize).ljust(9), + ('%d' % totaldeltasize).ljust(12), + ('%d' % totalblobsize).ljust(9), deltastr )) @@ -277,10 +277,10 @@ totalblobsize += blobsize else: blobsize = "(missing)" - ui.write("%s %s %s%s\n" % ( + ui.write("%s %s %s%d\n" % ( hashformatter(node), hashformatter(deltabase), - str(deltalen).ljust(14), + ('%d' % deltalen).ljust(14), blobsize)) if filename is not None: @@ -342,7 +342,7 @@ "Delta Length".ljust(6), )) - ui.write("%s %s %s %s\n" % ( + ui.write("%s %s %s %d\n" % ( hashformatter(node), hashformatter(deltabasenode), nodemod.hex(hashlib.sha1(delta).digest()),