D5117: storageutil: convert fileid to bytes to avoid cast to %s

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Tue Oct 16 15:55:13 UTC 2018


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  test-storage.py manages to trigger this on Python 3.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5117

AFFECTED FILES
  mercurial/utils/storageutil.py

CHANGE DETAILS

diff --git a/mercurial/utils/storageutil.py b/mercurial/utils/storageutil.py
--- a/mercurial/utils/storageutil.py
+++ b/mercurial/utils/storageutil.py
@@ -182,7 +182,8 @@
         try:
             return store.node(fileid)
         except IndexError:
-            raise error.LookupError(fileid, identifier, _('no match found'))
+            raise error.LookupError('%d' % fileid, identifier,
+                                    _('no match found'))
 
     if len(fileid) == 20:
         try:



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list