1818import logging
1919import os
2020
21+ from .extern .six import print_
2122from .extern .six import moves as m
2223ConfigParser = m .configparser .ConfigParser
2324
@@ -88,19 +89,20 @@ def _my_create_tag(self, version):
8889 msg = "Tagging %s" % (version ,)
8990 cmd = 'git tag -s %s -m "%s"' % (version , msg )
9091 if os .path .isdir ('.git/svn' ):
91- print ("\n EXPERIMENTAL support for git-svn tagging!\n " )
92+ print_ ("\n EXPERIMENTAL support for git-svn tagging!\n " )
9293 cur_branch = open ('.git/HEAD' ).read ().strip ().split ('/' )[- 1 ]
93- print ("You are on branch %s." % (cur_branch ,))
94+ print_ ("You are on branch %s." % (cur_branch ,))
9495 if cur_branch != 'master' :
95- print ("Only the master branch is supported for git-svn tagging." )
96- print ("Please tag yourself." )
97- print ("'git tag' needs to list tag named %s." % (version ,))
96+ print_ ("Only the master branch is supported for git-svn "
97+ "tagging." )
98+ print_ ("Please tag yourself." )
99+ print_ ("'git tag' needs to list tag named %s." % (version ,))
98100 sys .exit ()
99101 cmd = [cmd ]
100102 local_head = open ('.git/refs/heads/master' ).read ()
101103 trunk = open ('.git/refs/remotes/trunk' ).read ()
102104 if local_head != trunk :
103- print ("Your local master diverges from trunk.\n " )
105+ print_ ("Your local master diverges from trunk.\n " )
104106 # dcommit before local tagging
105107 cmd .insert (0 , 'git svn dcommit' )
106108 # create tag in svn
@@ -119,18 +121,18 @@ def _my_make_tag(self):
119121 if not isinstance (cmds , list ):
120122 cmds = [cmds ]
121123 if len (cmds ) == 1 :
122- print ("Tag needed to proceed, you can use the following command:" )
124+ print_ ("Tag needed to proceed, you can use the following command:" )
123125 for cmd in cmds :
124- print (cmd )
126+ print_ (cmd )
125127 if utils .ask ("Run this command" ):
126- print (system (cmd ))
128+ print_ (system (cmd ))
127129 else :
128130 # all commands are needed in order to proceed normally
129- print ("Please create a tag for %s yourself and rerun." % \
131+ print_ ("Please create a tag for %s yourself and rerun." % \
130132 (self .data ['version' ],))
131133 sys .exit ()
132134 if not self .vcs .tag_exists ('v' + self .data ['version' ]):
133- print ("\n Failed to create tag %s!" % (self .data ['version' ],))
135+ print_ ("\n Failed to create tag %s!" % (self .data ['version' ],))
134136 sys .exit ()
135137
136138 # Normally all this does is to return '--formats=zip', which is currently
0 commit comments