summaryrefslogtreecommitdiffstats
path: root/subcmds/abandon.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/abandon.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/abandon.py')
-rw-r--r--subcmds/abandon.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/subcmds/abandon.py b/subcmds/abandon.py
index e17ab2b6..b94ccdd3 100644
--- a/subcmds/abandon.py
+++ b/subcmds/abandon.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
17from command import Command 18from command import Command
18from git_command import git 19from git_command import git
@@ -36,7 +37,7 @@ It is equivalent to "git branch -D <branchname>".
36 37
37 nb = args[0] 38 nb = args[0]
38 if not git.check_ref_format('heads/%s' % nb): 39 if not git.check_ref_format('heads/%s' % nb):
39 print >>sys.stderr, "error: '%s' is not a valid name" % nb 40 print("error: '%s' is not a valid name" % nb, file=sys.stderr)
40 sys.exit(1) 41 sys.exit(1)
41 42
42 nb = args[0] 43 nb = args[0]
@@ -58,13 +59,13 @@ It is equivalent to "git branch -D <branchname>".
58 59
59 if err: 60 if err:
60 for p in err: 61 for p in err:
61 print >>sys.stderr,\ 62 print("error: %s/: cannot abandon %s" % (p.relpath, nb),
62 "error: %s/: cannot abandon %s" \ 63 file=sys.stderr)
63 % (p.relpath, nb)
64 sys.exit(1) 64 sys.exit(1)
65 elif not success: 65 elif not success:
66 print >>sys.stderr, 'error: no project has branch %s' % nb 66 print('error: no project has branch %s' % nb, file=sys.stderr)
67 sys.exit(1) 67 sys.exit(1)
68 else: 68 else:
69 print >>sys.stderr, 'Abandoned in %d project(s):\n %s' % ( 69 print('Abandoned in %d project(s):\n %s'
70 len(success), '\n '.join(p.relpath for p in success)) 70 % (len(success), '\n '.join(p.relpath for p in success)),
71 file=sys.stderr)