D6025: remotefilelog: fix format str, blobsize isn't always a #, can be "(missing)"
spectral created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6025 AFFECTED FILES hgext/remotefilelog/debugcommands.py CHANGE DETAILS diff --git a/hgext/remotefilelog/debugcommands.py b/hgext/remotefilelog/debugcommands.py --- a/hgext/remotefilelog/debugcommands.py +++ b/hgext/remotefilelog/debugcommands.py @@ -276,7 +276,7 @@ totalblobsize += blobsize else: blobsize = "(missing)" -ui.write("%s %s %s%d\n" % ( +ui.write("%s %s %s%s\n" % ( hashformatter(node), hashformatter(deltabase), ('%d' % deltalen).ljust(14), To: spectral, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6025: remotefilelog: fix format str, blobsize isn't always a #, can be "(missing)"
pulkit added inline comments. INLINE COMMENTS > debugcommands.py:279 > blobsize = "(missing)" > -ui.write("%s %s %s%d\n" % ( > +ui.write("%s %s %s%s\n" % ( > hashformatter(node), It was changed to `%d` because `%s % int` does not work on Python 3. I think `%s % pycompat.bytestr(blobsize)` should work on both python versions. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6025 To: spectral, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6025: remotefilelog: fix format str, blobsize isn't always a #, can be "(missing)"
spectral updated this revision to Diff 14249. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6025?vs=14243&id=14249 REVISION DETAIL https://phab.mercurial-scm.org/D6025 AFFECTED FILES hgext/remotefilelog/debugcommands.py CHANGE DETAILS diff --git a/hgext/remotefilelog/debugcommands.py b/hgext/remotefilelog/debugcommands.py --- a/hgext/remotefilelog/debugcommands.py +++ b/hgext/remotefilelog/debugcommands.py @@ -16,6 +16,7 @@ error, filelog, node as nodemod, +pycompat, revlog, ) from . import ( @@ -276,11 +277,11 @@ totalblobsize += blobsize else: blobsize = "(missing)" -ui.write("%s %s %s%d\n" % ( +ui.write("%s %s %s%s\n" % ( hashformatter(node), hashformatter(deltabase), ('%d' % deltalen).ljust(14), -blobsize)) +pycompat.bytestr(blobsize))) if filename is not None: printtotals() To: spectral, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6025: remotefilelog: fix format str, blobsize isn't always a #, can be "(missing)"
spectral marked an inline comment as done. spectral added inline comments. INLINE COMMENTS > pulkit wrote in debugcommands.py:279 > It was changed to `%d` because `%s % int` does not work on Python 3. I think > `%s % pycompat.bytestr(blobsize)` should work on both python versions. Changed to use pycompat.bytestr REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6025 To: spectral, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6025: remotefilelog: fix format str, blobsize isn't always a #, can be "(missing)"
This revision was automatically updated to reflect the committed changes. spectral marked an inline comment as done. Closed by commit rHG941685500125: remotefilelog: fix format str, blobsize isn't always a #, can be "(missing)" (authored by spectral, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6025?vs=14249&id=14250 REVISION DETAIL https://phab.mercurial-scm.org/D6025 AFFECTED FILES hgext/remotefilelog/debugcommands.py CHANGE DETAILS diff --git a/hgext/remotefilelog/debugcommands.py b/hgext/remotefilelog/debugcommands.py --- a/hgext/remotefilelog/debugcommands.py +++ b/hgext/remotefilelog/debugcommands.py @@ -16,6 +16,7 @@ error, filelog, node as nodemod, +pycompat, revlog, ) from . import ( @@ -276,11 +277,11 @@ totalblobsize += blobsize else: blobsize = "(missing)" -ui.write("%s %s %s%d\n" % ( +ui.write("%s %s %s%s\n" % ( hashformatter(node), hashformatter(deltabase), ('%d' % deltalen).ljust(14), -blobsize)) +pycompat.bytestr(blobsize))) if filename is not None: printtotals() To: spectral, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel