Commits

Satish Balay committed 1547ecb

nightlybuilds: switch to git.
Also specify branch to test to startnightly

Comments (0)

Files changed (6)

bin/maint/builddist

 # This script builds the PETSc tar file distribution
 #
 # Usage: builddist petscrepo
-# example usage: builddist /sandbox/petsc/petsc-dist
+# example usage: builddist /sandbox/petsc/petsc.git
 # Notes: version info is automatically obtained from include/petscversion.h
 #
 #echo "------- Have you done ALL of the following?? -----------------------------"
   exit
 fi
 
-# Clean and Update the hg repository
-cd $PETSC_DIR/config/BuildSystem; hg revert -a; hg -q clean --all; hg -q pull -u
-cd $PETSC_DIR; hg revert -a; hg -q clean -X bin/win32fe --all; hg -q pull -u
+# Clean and Update the git repository
+cd $PETSC_DIR; git reset --hard; git clean; git pull -q
 
 # check petscversion.h and set the version string
 version_release=`grep '^#define PETSC_VERSION_RELEASE ' include/petscversion.h |tr -s ' ' | cut -d ' ' -f 3`
 
 #generated a couple of more values
 version_patch_date=`date`
-version_hg=`hg tip --template '{node}'`
-version_date_hg=`hg tip --template '{date|date}'`
+version_git=`git log -1 --pretty=format:%H`
+version_date_git=`git log -1 --pretty=format:%aD`
 if  [ ${version_release} = 0 ]; then
   version=-dev
 elif [ ${version_release} = 1 ]; then
 /bin/grep -v 'chmod' conf/rules.bak > conf/rules
 /bin/rm -f  conf/rules.bak
 
-#add in PETSC_VERSION_PATCH_DATE and PETSC_VERSION_HG
+#add in PETSC_VERSION_PATCH_DATE and PETSC_VERSION_GIT
 echo Using PETSC_VERSION_PATCH_DATE: ${version_patch_date}
-echo Using PETSC_VERSION_HG: ${version_hg}
+echo Using PETSC_VERSION_GIT: ${version_git}
 /bin/mv include/petscversion.h include/petscversion.h.bak
 cat include/petscversion.h.bak | \
   sed -e "s/#define PETSC_VERSION_PATCH_DATE.*/#define PETSC_VERSION_PATCH_DATE \"${version_patch_date}\"/" | \
-  sed -e "s/#define PETSC_VERSION_HG.*/#define PETSC_VERSION_HG         \"${version_hg}\"/" | \
-  sed -e "s/#define PETSC_VERSION_DATE_HG.*/#define PETSC_VERSION_DATE_HG         \"${version_date_hg}\"/" \
+  sed -e "s/#define PETSC_VERSION_GIT.*/#define PETSC_VERSION_GIT         \"${version_git}\"/" | \
+  sed -e "s/#define PETSC_VERSION_DATE_GIT.*/#define PETSC_VERSION_DATE_GIT         \"${version_date_git}\"/" \
   > include/petscversion.h
 /bin/rm -f include/petscversion.h.bak
 

bin/maint/buildtest

 rm -f build.log
 echo "Build on $MACH $ARCH $nPETSC_DIR `date` " > build.log
 
-# Note use 'hg clean --all' intead of manually deleting seleted old files.
+# Note use 'git clean' intead of manually deleting seleted old files.
 # This also requires 'clean' extension enabled on all nightly build machines.
 
-echo "Cleaning throughly and updating mercurial clone at $nPETSC_DIR" >>& build.log
-(hg -q revert -a; hg -q clean --all -X build.log; hg -q pull -u) >>& build.log
-(cd config/BuildSystem; hg -q revert -a; hg -q clean --all; hg -q pull -u; cd $nPETSC_DIR) >>& build.log
+echo "Cleaning throughly and updating git clone at $nPETSC_DIR" >>& build.log
+(git reset --hard; git clean -q -e build.log;git pull -q) >>& build.log
 
-# if externalpackage tarball also packs a hg repo - one has to explicitly remove it
+# if externalpackage tarball also packs a git repo - one has to explicitly remove it
 rm -rf ./externalpackages
 
 setenv PETSC_DIR $nPETSC_DIR

bin/maint/confignightly/default

 # It uses "TEST" variable set by the calling script - and setsup:
 # TNAME : the actual config file for this test
 # RNAME : name of the local repo clone for this test [petsc-dev vs petsc33]
-# PURL  : petsc url
-# BURL  : buildsystem url
+# URL  : petsc repo url
 #
   set SSH=ssh
   set SCP=scp
   set DASHN=-n
-  set MERCURIAL=yes
-  echo $TEST | grep ^rel/ > /dev/null
-  if ("$?" == "0") then
-    set TNAME=`echo ${TEST} | sed 's^rel/^^'`
-    set PURL=https://bitbucket.org/petsc/petsc-3.3
-    set BURL=https://bitbucket.org/petsc/buildsystem-3.3
-    set RNAME=petsc33
-  else
-    set TNAME=${TEST}
-    set PURL=https://bitbucket.org/petsc/petsc-dev
-    set BURL=https://bitbucket.org/petsc/buildsystem
-    set RNAME=petsc-dev
+  set GIT=yes
+  set URL=https://bitbucket.org/petsc/petsc
+  set RNAME=petsc.git
+  set TNAME=`echo ${TEST} | cut -d ':' -f 1`
+  set BRANCH=`echo ${TEST} | cut -s -d ':' -f 2`
+  if ("$BRANCH" == "") then
+    set BRANCH='next'
   endif

bin/maint/startnightly

 #! /bin/csh
 #
-# usage startnightly test1 test2 rel/test3 rel/test4 ...
+# usage startnightly test1 test2 test3:maint test4:next ...
 #
 set dir=`dirname $0`
 set bdir=`dirname $dir`
   source $dir/confignightly/${TNAME}
 
   echo "Starting $TEST : $CONF build at `date`"
-  if ("${MERCURIAL}" == "yes") then
+  if ("${GIT}" == "yes") then
     $SSH $USR@$MACH $DASHN test "\( -d  $LOC \)"
     if ("$?" != "0") then
-      if ("$PURL" != "" || "$BURL" != "") then
-      echo "$LOC does not exist! Creating clones using $PURL and $BURL"
-      $SSH $USR@$MACH $DASHN "hg clone -q $PURL $LOC; hg clone -q $BURL $LOC/config/BuildSystem"
+      if ("$URL" != "") then
+      echo "$LOC does not exist! Creating clone using $URL"
+      $SSH $USR@$MACH $DASHN "git clone -q $URL $LOC"
       endif
     endif
     echo "Cleaning and updating clone at $USR@$MACH $LOC"
-    $SSH $USR@$MACH $DASHN "cd $LOC ; hg -q revert -a; hg -q pull -u"
+    $SSH $USR@$MACH $DASHN "cd $LOC ; git reset --hard; git checkout ${BRANCH}; git pull -q "
   else
     rsync -e ssh -az --delete  $pdir/ ${USR}@${MACH}:${LOC}
   endif

include/petscversion.h

 #define PETSC_VERSION_DATE       "Jun, 5, 2012"
 #define PETSC_VERSION_PATCH_DATE "unknown"
 
-#if !defined (PETSC_VERSION_HG)
-#define PETSC_VERSION_HG         "unknown"
+#if !defined (PETSC_VERSION_GIT)
+#define PETSC_VERSION_GIT         "unknown"
 #endif
 
-#if !defined(PETSC_VERSION_DATE_HG)
-#define PETSC_VERSION_DATE_HG    "unknown"
+#if !defined(PETSC_VERSION_DATE_GIT)
+#define PETSC_VERSION_DATE_GIT    "unknown"
 #endif
 
 #define PETSC_VERSION_(MAJOR,MINOR,SUBMINOR) \
           echo "Unknown PETSC_VERSION_RELEASE: $${version_release}"; \
           exit; \
         fi; \
-        datestr=`hg tip --template "{date|shortdate}"`; \
+        datestr=`git log -1 --pretty=format:%ai | cut -d ' ' -f 1`; \
         export datestr; \
         find * -type d -wholename src/docs/website -prune -o -type d -wholename src/benchmarks/results -prune -o \
           -type d -wholename 'arch-*' -prune -o -type d -wholename src/tops -prune -o -type d -wholename externalpackages -prune -o \