9 [ "$1" ] && echo "$progname: $1" >&2
22 Usage: $progname <lustretag> <pindate>
23 where <lustretag> is a tag of the lustre-core module
24 and <pindate> is an optional quoted timestamp suitable for cvs -D
28 if [ -z "$LUSTRECVS_UPDATED" ] ; then
29 echo "$progname: updating lustrecvs"
31 # If checking out a specific tag, make sure all of the files here are also
32 # checked out with the same tag to avoid later changes breaking things.
34 v*|b_release_*) TAG="-r $1" ;;
38 export LUSTRECVS_UPDATED=yes
42 [ "$1" = "-r" ] && shift
57 warn "a lustretag is required."
66 # this is the branch table
67 # keep this list sorted alphabetically!
69 # These use special build directories
71 b1_4*) buildtag="b1_4" ;;
73 b_release_1_4_6-patchless) buildtag="b1_4" ;;
74 b_release_1_4_7-test) buildtag="b_release_1_4_7" ;;
76 b_release*) buildtag=$lustretag ;;
78 b_uoss) buildtag=$lustretag ;;
80 # These releases did not get build tagged for them because they
81 # this build system didn't exist when they were tagged
86 v*) buildtag=$lustretag ;;
88 # this is the branch table
89 # keep this list sorted alphabetically!
91 *_gate) buildtag="b_build_gate" ;;
107 if [ "$tag" = "HEAD" ] ; then
110 elif [ "$tag" ] ; then
114 # silently skip if no tag was specified
118 # create a cvs date format that will survive shell expansion
119 if [ -n "$pindate" ]; then
120 datecmd=$(date -u +%s -d "$pindate")
121 datecmd="-D @$datecmd"
126 if [ -d "$dir" ] ; then
127 echo "$progname: Updating $dir to $tag"
128 ( cd "$dir" && cvs up $datecmd -dAP $uptag )
130 echo "$progname: Checking out $dir from $tag"
131 cvs co $datecmd -P $cotag -d "$dir" "$module"
133 if [ $? != 0 ] ; then
134 error_modules="$dir $error_modules"
144 if [ ! "$repository" ]; then
148 if ! which hg &> /dev/null; then
151 Error: Mercurial is missing, try 'yum install mercurial', 'apt-get install
152 mercurial' or try http://rpmfind.net/linux/rpm2html/search.php?query=mercurial
154 error_modules="$dir $error_modules"
158 url="$base_url/$repository"
160 # create a cvs date format that will survive shell expansion
161 if [ -n "$pindate" ]; then
162 datecmd=$(date -u +%s -d "$pindate")
163 datecmd="-d \"$datecmd 0\""
168 if [ -d "$dir" ]; then
169 echo "$progname: Updating $dir"
170 if [ -f "$dir/update.sh" ]; then
171 ( cd "$dir" && ./update.sh $datecmd )
173 ( cd "$dir" && hg pull && hg update $datecmd )
176 echo "$progname: Checking out $dir"
178 if [ -f "$dir/setup.sh" ]; then
179 ( cd "$dir" && ./setup.sh $datecmd )
181 ( cd "$dir" && hg update $datecmd )
185 if [ $? != 0 ] ; then
186 error_modules="$dir $error_modules"
190 cvs_cmd build lustre-build "$buildtag"
192 if [ -f build/buildcvs ] ; then
195 fatal 1 "build/buildcvs does not exist; not updating other modules."
198 if [ "$error_modules" ] ; then
199 fatal 1 "There were errors checking out the following directories: $error_modules"