Patchwork [1,of,7,v2] undumprevlog: update to valid Python 3 syntax

login
register
mail settings
Submitter Augie Fackler
Date Aug. 22, 2017, 9:27 p.m.
Message ID <536b3969d2242224898f.1503437272@imladris.local>
Download mbox | patch
Permalink /patch/23215/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 22, 2017, 9:27 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1503421131 14400
#      Tue Aug 22 12:58:51 2017 -0400
# Node ID 536b3969d2242224898f574919b134df4ba190a8
# Parent  af20468eb0a499c094dbd6e27ffcacf54cf5a8e6
undumprevlog: update to valid Python 3 syntax

I didn't do anything to ensure correctness here, just enough to avoid
tracebacks in the import checker, which uses the native ast module to
try and parse all our Python files.

Patch

diff --git a/contrib/undumprevlog b/contrib/undumprevlog
--- a/contrib/undumprevlog
+++ b/contrib/undumprevlog
@@ -3,7 +3,7 @@ 
 # $ hg init
 # $ undumprevlog < repo.dump
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import sys
 from mercurial import (
@@ -27,7 +27,7 @@  while True:
     if l.startswith("file:"):
         f = l[6:-1]
         r = revlog.revlog(opener, f)
-        print f
+        print(f)
     elif l.startswith("node:"):
         n = node.bin(l[6:-1])
     elif l.startswith("linkrev:"):