diff options
Diffstat (limited to 'subcmds/download.py')
-rw-r--r-- | subcmds/download.py | 21 |
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 | ||
16 | from __future__ import print_function | ||
16 | import re | 17 | import re |
17 | import sys | 18 | import 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: |