More Py2/3 compatibility changes
- Legacy-Id: 16582
This commit is contained in:
parent
ba12077f4a
commit
9b415e5826
|
@ -36,7 +36,7 @@ COPYRIGHT
|
|||
Open Source Initiative at http://opensource.org/licenses/BSD-2-Clause.
|
||||
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
@ -132,7 +132,7 @@ def pipe(cmd, inp=None):
|
|||
code = pipe.returncode
|
||||
if code != 0:
|
||||
raise OSError(err)
|
||||
return out
|
||||
return out.decode('utf-8')
|
||||
|
||||
def split_loginfo(line):
|
||||
try:
|
||||
|
@ -153,7 +153,7 @@ def split_loginfo(line):
|
|||
|
||||
# Get repository information
|
||||
svn_info = {}
|
||||
for line in pipe('svn info .').decode('utf-8').splitlines():
|
||||
for line in pipe('svn info .').splitlines():
|
||||
if line:
|
||||
key, value = line.strip().split(':', 1)
|
||||
svn_info[key] = value.strip()
|
||||
|
@ -179,7 +179,7 @@ merged_revs = {}
|
|||
write_cache = False
|
||||
loginfo_format = r'^r[0-9]+ \| [^@]+@[^@]+ \| \d\d\d\d-\d\d-\d\d '
|
||||
note("Getting svn:mergeinfo for current branch")
|
||||
for line in pipe('svn propget svn:mergeinfo .').decode('utf-8').splitlines():
|
||||
for line in pipe('svn propget svn:mergeinfo .').splitlines():
|
||||
if opt_verbose:
|
||||
sys.stderr.write('.')
|
||||
if line in mergeinfo:
|
||||
|
@ -357,7 +357,7 @@ for branch in branches:
|
|||
commits.sort()
|
||||
unmerged_branch_commits[branch] = commits
|
||||
|
||||
keys = all_commits.keys()
|
||||
keys = list(all_commits.keys())
|
||||
keys.sort()
|
||||
# Check that we don't have holes in the commit list -- commits not mentioned
|
||||
# as ready for merge, and not already merged, earlier than a waiting commit.
|
||||
|
@ -379,7 +379,7 @@ for key in keys:
|
|||
sys.stderr.write("\n")
|
||||
del unmerged_branch_commits[branch][0]
|
||||
|
||||
keys = not_passed.keys()
|
||||
keys = list(not_passed.keys())
|
||||
keys.sort()
|
||||
if len(keys) > 0:
|
||||
sys.stderr.write("Commits marked ready which haven't passed the test suite:\n")
|
||||
|
@ -387,7 +387,7 @@ if len(keys) > 0:
|
|||
sys.stderr.write(not_passed[key]+'\n')
|
||||
sys.stderr.write('\n')
|
||||
|
||||
keys = ready_commits.keys()
|
||||
keys = list(ready_commits.keys())
|
||||
keys.sort()
|
||||
for key in keys:
|
||||
print(ready_commits[key])
|
||||
|
|
Loading…
Reference in a new issue