summaryrefslogtreecommitdiffstats
path: root/subcmds/download.py
diff options
context:
space:
mode:
authorSarah Owens <sarato@inkylabs.com>2012-11-01 22:59:27 -0700
committerSarah Owens <sarato@inkylabs.com>2012-11-13 17:33:56 -0800
commitcecd1d864fc3cf02cf50d367111e0d0e173c5dc6 (patch)
treeb4f660400560dce21cd7a00ffe5a5d74b54bcb81 /subcmds/download.py
parentfc241240d828d7e8302dc0876608a9d27ae1cbc7 (diff)
downloadgit-repo-cecd1d864fc3cf02cf50d367111e0d0e173c5dc6.tar.gz
Change print statements to work in python3
This is part of a series of changes to introduce Python3 support. Change-Id: I373be5de7141aa127d7debdbce1df39148dbec32
Diffstat (limited to 'subcmds/download.py')
-rw-r--r--subcmds/download.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/subcmds/download.py b/subcmds/download.py
index 0abe90d0..6aa54afa 100644
--- a/subcmds/download.py
+++ b/subcmds/download.py
@@ -13,6 +13,7 @@
13# See the License for the specific language governing permissions and 13# See the License for the specific language governing permissions and
14# limitations under the License. 14# limitations under the License.
15 15
16from __future__ import print_function
16import re 17import re
17import sys 18import sys
18 19
@@ -68,23 +69,23 @@ makes it available in your project's local working directory.
68 for project, change_id, ps_id in self._ParseChangeIds(args): 69 for project, change_id, ps_id in self._ParseChangeIds(args):
69 dl = project.DownloadPatchSet(change_id, ps_id) 70 dl = project.DownloadPatchSet(change_id, ps_id)
70 if not dl: 71 if not dl:
71 print >>sys.stderr, \ 72 print('[%s] change %d/%d not found'
72 '[%s] change %d/%d not found' \ 73 % (project.name, change_id, ps_id),
73 % (project.name, change_id, ps_id) 74 file=sys.stderr)
74 sys.exit(1) 75 sys.exit(1)
75 76
76 if not opt.revert and not dl.commits: 77 if not opt.revert and not dl.commits:
77 print >>sys.stderr, \ 78 print('[%s] change %d/%d has already been merged'
78 '[%s] change %d/%d has already been merged' \ 79 % (project.name, change_id, ps_id),
79 % (project.name, change_id, ps_id) 80 file=sys.stderr)
80 continue 81 continue
81 82
82 if len(dl.commits) > 1: 83 if len(dl.commits) > 1:
83 print >>sys.stderr, \ 84 print('[%s] %d/%d depends on %d unmerged changes:' \
84 '[%s] %d/%d depends on %d unmerged changes:' \ 85 % (project.name, change_id, ps_id, len(dl.commits)),
85 % (project.name, change_id, ps_id, len(dl.commits)) 86 file=sys.stderr)
86 for c in dl.commits: 87 for c in dl.commits:
87 print >>sys.stderr, ' %s' % (c) 88 print(' %s' % (c), file=sys.stderr)
88 if opt.cherrypick: 89 if opt.cherrypick:
89 project._CherryPick(dl.commit) 90 project._CherryPick(dl.commit)
90 elif opt.revert: 91 elif opt.revert: