#!/usr/bin/env bash ## TO MAKE THIS RUN YOUR CUSTOM COMPILED SVN, two simple options: ## 1. Adjust your PATH to point at your custom installed location: ## export PATH="$HOME/prefix/svn_trunk/bin:$PATH" ## OR ## 2. Uncomment the four lines below to use aliases into your ## built source tree. The next line is the only line you should ## need to adjust. # SVNDIR=/path/to/built_subversion_source_tree # function svn() { "$SVNDIR/subversion/svn/svn" "$@"; } # function svnserve() { "$SVNDIR/subversion/svnserve/svnserve" "$@"; } # function svnadmin() { "$SVNDIR/subversion/svnadmin/svnadmin" "$@"; } set -e svn --version BASE="$(mktemp -d "/tmp/$(basename "$0").XXX")" echo "BASE = $BASE" REPOS="$BASE/repos" WC="$BASE/wc" URL="file://$REPOS" svnadmin create "$REPOS" svn co -q "$URL" "$WC" set +e set -x cd "$WC" ## ACTUAL TEST mkdir trunk echo "apples oranges tomatoes cheese potatoes " > trunk/a svn add trunk svn ci -m1 svn cp -m2 ^/trunk ^/branch svn up change() { sed -i "s/^$1\$/$2/" a svn ci -mm } cd trunk change apples r3 cd .. cd branch change cheese r4 change apples r5 cd .. svn up echo -e "df\np\n" | svn merge -c5 ^/branch trunk/ #svn merge -c5 ^/branch trunk/ svn diff ## END set +x echo "BASE = $BASE"