Commits

anatoly techtonik committed 9b95a84

convert.sg: generate new clone that contains selected branches only

  • Participants
  • Parent commits 4e5d806

Comments (0)

Files changed (1)

 CURDIR="$( cd "$( dirname "$0" )" && pwd )"
 PARENT="$( cd "$( dirname "$0" )/.." && pwd )"
 REPO_PATH=file://$PARENT/scons-mirror
-DEST_DIR=$PARENT/scons-hg
-DEST_NO_BRANCH_CLONE=$DEST_DIR-nobranches
+DEST_DIR=$PARENT/scons-full
+DEST_NO_BRANCH_CLONE=$PARENT/scons-nobranches
+DEST_SELECTED=$PARENT/scons-selected-no-core
+BRANCHES="2.0 automake_model comments fortran_refactor heapmonitor i18n installer jython libwithcontext msvc_fixes py-builder sigrefactor vs_revamp"
+
+# NOTE: `packaging` branch is missing from the full repository for some reason
 
 if [ -x $DEST_DIR ]
 then
-    echo "Destination folder already exists."
+    echo "Destination folder $DEST_DIR already exists."
     exit 1
 fi
 
 hg convert --datesort --authormap=$CURDIR/authors.txt --filemap=$CURDIR/filemap.txt --splicemap=$CURDIR/splicemap.txt $REPO_PATH $DEST_DIR
 
 
-# Uncomment to the create additional clone without branches (trunk/ only)
+# Create additional clone without branches (trunk/ only)
+rm -rf $DEST_NO_BRANCH_CLONE
 echo "Creating branchless clone in $DEST_NO_BRANCH_CLONE"
 hg clone $DEST_DIR $DEST_NO_BRANCH_CLONE -r default -U
 
+# Create additioinal clone with selected branches
+rm -rf $DEST_SELECTED
+echo "Creating clone with selected branches in $DEST_SELECTED"
+hg clone $DEST_DIR $DEST_SELECTED -r default -U
+for branch in $BRANCHES
+do
+  hg pull --cwd $DEST_SELECTED -b $branch $DEST_DIR
+done
+
+
 # add hgignore
 #cd $DEST_DIR
 #hg up -C default