diff options
Diffstat (limited to 'subcmds/abandon.py')
-rw-r--r-- | subcmds/abandon.py | 15 |
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 | ||
16 | from __future__ import print_function | ||
16 | import sys | 17 | import sys |
17 | from command import Command | 18 | from command import Command |
18 | from git_command import git | 19 | from 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) | ||