ldiskfstag_head="b1_8_iam"
lustreiokittag="HEAD"
libcfstag="b1_x"
-dmutag=""
+dmutag="" # uDMU
+spltag=""
+zfstag=""
hg_base_url="http://www.wizy.org/mercurial"
+git_base_url="git@git.lustre.org:%s.git"
export LC_COLLATE=C
# Branches that have been updated to include
# the libcfs split should be added here
- HEAD|b_head_capa|b_hd_cfld|b_hd_changelog|b_hd_sptlrpc|HD_SPTLRPC_BASE|b_som|b_hd_kdmu|b_hd_recov|b_hd_transapi)
+ HEAD|b_head_capa|b_hd_cfld|b_hd_changelog|b_hd_sptlrpc|HD_SPTLRPC_BASE|b_som|b_hd_recov|b_hd_transapi)
lnettag="HEAD"
ldiskfstag="$ldiskfstag_head"
libcfstag="HEAD"
;;
+ b_hd_kdmu)
+ # Identical to HEAD + spl and zfs
+ lnettag="HEAD"
+ ldiskfstag="$ldiskfstag_head"
+ libcfstag="HEAD"
+ spltag="pre-alpha"
+ zfstag="top"
+ ;;
+
b_head_libcfs)
lnettag="b_head_libcfs"
ldiskfstag="$ldiskfstag_head"
cvs_cmd lustre-iokit lustre-iokit "$lustreiokittag"
hg_cmd lustre/zfs-lustre "$hg_base_url" "$dmutag"
cvs_cmd libcfs libcfs "$libcfstag"
+git_cmd spl spl "$spltag" "$git_base_url"
+git_cmd zfs zfs "$zfstag" "$git_base_url"
[ -a ldiskfs/build ] || ln -sf ../build ldiskfs/build
fi
}
+git_cmd ()
+{
+ dir="$1"
+ repository="$2"
+ branch="$3"
+ base_url="$4"
+
+ if [ ! "$branch" ]; then
+ return
+ fi
+
+ if ! which git &> /dev/null; then
+ cat <<EOF
+
+Error: git is missing, try 'yum install git', 'apt-get install
+git' or try http://rpmfind.net/linux/rpm2html/search.php?query=git
+EOF
+ error_modules="$dir $error_modules"
+ return
+ fi
+
+ url=`printf "$base_url" "$repository"`
+
+ if [ -n "$pindate" ]; then
+ echo "\nSorry, pindate is not supported with git."
+ error_modules="$dir $error_modules"
+ return
+ fi
+
+ if [ -d "$dir" ]; then
+ echo "$progname: Updating $dir"
+
+ pushd "$dir" > /dev/null
+
+ # Fetch new objects
+ git fetch "$url" "$branch"
+
+ # Create branch if it doesn't exist already (e.g. we switched branches)
+ [ $? -eq 0 ] && $($(git branch -b $branch origin/$branch &> /dev/null) || true)
+
+ # Rebase local commits
+ [ $? -eq 0 ] && git rebase origin/$branch $branch
+
+ rc=$?
+
+ popd > /dev/null
+ else
+ echo "$progname: Checking out $dir"
+ git clone "$url" "$dir"
+ rc=$?
+
+ if [ $rc -eq 0 -a "$branch" != "master" ]; then
+ ( cd "$dir" && git checkout -b $branch origin/$branch )
+ rc=$?
+ fi
+ fi
+
+ if [ $rc -ne 0 ] ; then
+ error_modules="$dir $error_modules"
+ fi
+}
+
cvs_cmd build lustre-build "$buildtag"
if [ -f build/buildcvs ] ; then