gitcmd = git.Git('.')
logger.debug(
'git reset --hard HEAD:\n%s'
- %(gitcmd.reset('--hard','HEAD'))
+ %(gitcmd.reset('--hard','HEAD').strip())
)
logger.debug(
- 'git clean -fdx:\n%s'
- %(gitcmd.execute(['sudo','git','clean','-fdx']))
+ 'sudo git clean -fdx:\n%s'
+ %(gitcmd.execute(['sudo','git','clean','-fdx']).strip())
)
logger.debug(
'git branch -D %s\n%s'
- %(localname,gitcmd.branch('-D','%s' %(localname),with_exceptions=False))
+ %(localname,gitcmd.branch('-D','%s' %(localname),with_exceptions=False).strip())
)
try:
%(
localname,
remotename,
- gitcmd.checkout('-b','%s' %(localname),'%s' %(remotename))
+ gitcmd.checkout('-b','%s' %(localname),'%s' %(remotename).strip())
)
)
except Exception, exception:
raise Exception('Failure while checking out Git clone:\n%s' %(exception))
else:
- logger.debug('Status is now:\n%s' %( gitcmd.status() ))
+ logger.debug('Status is now:\n%s' %( gitcmd.status().strip() ))
# cleanup existing *orig.tar.gz
if os.path.isdir(BUILD_AREA):