Jed Brown committed ee13f3e Merge

Merge branch 'balay/nightlybuilds-change-to-git' of bitbucket:petsc/petsc

* 'balay/nightlybuilds-change-to-git' of bitbucket:petsc/petsc:
git: rev-parse adds newlines and breaks compiles. reverting to 'log -1'
nightlybuilds: add -x to 'git clean' for buildtest aswell

Comments (0)

Files changed (3)

 #generated a couple of more values
-version_git=`git rev-parse HEAD`
+version_git=`git log -1 --pretty=format:%H`
 version_date_git=`git log -1 --pretty=format:%ci`
 if  [ ${version_release} = 0 ]; then
   if [ "$branch" = "master" ]; then
 # This also requires 'clean' extension enabled on all nightly build machines.
 echo "Cleaning throughly and updating git clone at $nPETSC_DIR" >>& build.log
-(git reset --hard; git clean -q -d -f -e build.log;git pull -q) >>& build.log
+(git reset --hard; git clean -q -f -d -x -e build.log;git pull -q) >>& build.log
 # if externalpackage tarball also packs a git repo - one has to explicitly remove it
 rm -rf ./externalpackages


       self.isClone = 1
       if os.path.exists(os.path.join(self.dir, '.git')):
         if hasattr(self.sourceControl,'git'):
-          self.addDefine('VERSION_GIT','"'+os.popen("cd "+self.dir+" && "+self.sourceControl.git+" rev-parse --verify HEAD").read()+'"')
+          self.addDefine('VERSION_GIT','"'+os.popen("cd "+self.dir+" && "+self.sourceControl.git+" log -1 --pretty=format:%H").read()+'"')
           self.addDefine('VERSION_DATE_GIT','"'+os.popen("cd "+self.dir+" && "+self.sourceControl.git+" log -1 --pretty=format:%ci").read()+'"')
           self.logPrintBox('\n*****WARNING: PETSC_DIR appears to be a Git clone - but git is not found in PATH********\n')