# # # patch "ChangeLog" # from [02a13c066e0006a924494c5f78472a657f32d8a3] # to [09f87b7ffdc283ada4245ffc94fc05acefc0bc0d] # # patch "contrib/monotone-mirror-postaction-update.sh" # from [ef56317b5f2fee18598e4105a670e5b5a463fde7] # to [d2f3cfbd3ceb4dbd00c1ea7394a4b8488faf5366] # ============================================================ --- ChangeLog 02a13c066e0006a924494c5f78472a657f32d8a3 +++ ChangeLog 09f87b7ffdc283ada4245ffc94fc05acefc0bc0d @@ -1,5 +1,11 @@ 2006-12-31 Richard Levitte + * contrib/monotone-mirror-postaction-update.sh (database): + Make it possible to checkout into an empty directory. Add a + bit more logging. + +2006-12-31 Richard Levitte + * debian/control (Build-Depends): Add a dependency to the libboost-serialization-dev package. It's unfortunate that I forgot to do this before the release of 0.32... ============================================================ --- contrib/monotone-mirror-postaction-update.sh ef56317b5f2fee18598e4105a670e5b5a463fde7 +++ contrib/monotone-mirror-postaction-update.sh d2f3cfbd3ceb4dbd00c1ea7394a4b8488faf5366 @@ -47,16 +47,28 @@ cat "$rc" | while read DIRECTORY BRANCH; echo "Skipping..." >&2 elif [ -d "$DIRECTORY" ]; then ( - cd $DIRECTORY - thisbranch= - if [ -f _MTN/options ]; then - thisbranch=`grep '^ *branch ' _MTN/options | sed -e 's/^ *branch *"//' -e 's/" *$//'` - fi - if [ "$thisbranch" = "$BRANCH" ]; then - mtn update + if [ -d $DIRECTORY/_MTN ]; then + thisbranch= + if [ -f $DIRECTORY/_MTN/options ]; then + thisbranch=`grep '^ *branch ' $DIRECTORY/_MTN/options | sed -e 's/^ *branch *"//' -e 's/" *$//'` + fi + if [ "$thisbranch" = "$BRANCH" ]; then + echo "Updating the directory $DIRECTORY" >&2 + ( cd $DIRECTORY; mtn update ) + else + echo "The directory $DIRECTORY doesn't contain the branch $BRANCH" >&2 + echo "Skipping..." >&2 + fi else - echo "The directory $DIRECTORY doesn't contain the branch $BRANCH" >&2 - echo "Skipping..." >&2 + filesn=`ls -1 -a $DIRECTORY | egrep -v '^\.\.?$' | wc -l` + if [ "$filesn" -eq 0 ]; then + echo "Extracting branch $BRANCH into empty directory $DIRECTORY" >&2 + ( cd $DIRECTORY; mtn -d "$database" -b "$BRANCH" co . ) + else + + echo "The directory $DIRECTORY doesn't contain the branch $BRANCH" >&2 + echo "Skipping..." >&2 + fi fi ) elif [ -e "$DIRECTORY" ]; then