summaryrefslogtreecommitdiffstats
path: root/subcmds/rebase.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/rebase.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/rebase.py')
-rw-r--r--subcmds/rebase.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/subcmds/rebase.py b/subcmds/rebase.py
index a8d58cdb..06cda22c 100644
--- a/subcmds/rebase.py
+++ b/subcmds/rebase.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 sys 17import sys
17 18
18from command import Command 19from command import Command
@@ -59,14 +60,16 @@ branch but need to incorporate new upstream changes "underneath" them.
59 one_project = len(all_projects) == 1 60 one_project = len(all_projects) == 1
60 61
61 if opt.interactive and not one_project: 62 if opt.interactive and not one_project:
62 print >>sys.stderr, 'error: interactive rebase not supported with multiple projects' 63 print('error: interactive rebase not supported with multiple projects',
64 file=sys.stderr)
63 return -1 65 return -1
64 66
65 for project in all_projects: 67 for project in all_projects:
66 cb = project.CurrentBranch 68 cb = project.CurrentBranch
67 if not cb: 69 if not cb:
68 if one_project: 70 if one_project:
69 print >>sys.stderr, "error: project %s has a detatched HEAD" % project.relpath 71 print("error: project %s has a detatched HEAD" % project.relpath,
72 file=sys.stderr)
70 return -1 73 return -1
71 # ignore branches with detatched HEADs 74 # ignore branches with detatched HEADs
72 continue 75 continue
@@ -74,7 +77,8 @@ branch but need to incorporate new upstream changes "underneath" them.
74 upbranch = project.GetBranch(cb) 77 upbranch = project.GetBranch(cb)
75 if not upbranch.LocalMerge: 78 if not upbranch.LocalMerge:
76 if one_project: 79 if one_project:
77 print >>sys.stderr, "error: project %s does not track any remote branches" % project.relpath 80 print("error: project %s does not track any remote branches"
81 % project.relpath, file=sys.stderr)
78 return -1 82 return -1
79 # ignore branches without remotes 83 # ignore branches without remotes
80 continue 84 continue
@@ -101,8 +105,8 @@ branch but need to incorporate new upstream changes "underneath" them.
101 105
102 args.append(upbranch.LocalMerge) 106 args.append(upbranch.LocalMerge)
103 107
104 print >>sys.stderr, '# %s: rebasing %s -> %s' % \ 108 print('# %s: rebasing %s -> %s'
105 (project.relpath, cb, upbranch.LocalMerge) 109 % (project.relpath, cb, upbranch.LocalMerge), file=sys.stderr)
106 110
107 needs_stash = False 111 needs_stash = False
108 if opt.auto_stash: 112 if opt.auto_stash: