D3591: py3: use '%d' for integers in hgext/infinitepush/__init__.py

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat May 19 10:36:01 EDT 2018


pulkit 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/D3591

AFFECTED FILES
  hgext/infinitepush/__init__.py

CHANGE DETAILS

diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py
+++ b/hgext/infinitepush/__init__.py
@@ -565,19 +565,19 @@
         if isinstance(localkey, str) and _scratchbranchmatcher(localkey):
             scratchnode = repo.bundlestore.index.getnode(localkey)
             if scratchnode:
-                return "%s %s\n" % (1, scratchnode)
+                return "%d %s\n" % (1, scratchnode)
             else:
-                return "%s %s\n" % (0, 'scratch branch %s not found' % localkey)
+                return "%d %s\n" % (0, 'scratch branch %s not found' % localkey)
         else:
             try:
                 r = hex(repo.lookup(localkey))
-                return "%s %s\n" % (1, r)
+                return "%d %s\n" % (1, r)
             except Exception as inst:
                 if repo.bundlestore.index.getbundle(localkey):
-                    return "%s %s\n" % (1, localkey)
+                    return "%d %s\n" % (1, localkey)
                 else:
                     r = str(inst)
-                    return "%s %s\n" % (0, r)
+                    return "%d %s\n" % (0, r)
     return _lookup
 
 def _pull(orig, ui, repo, source="default", **opts):



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


More information about the Mercurial-devel mailing list