diff options
author | W. Trevor King <wking@drexel.edu> | 2009-06-30 11:29:06 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-06-30 11:29:06 -0400 |
commit | 1e8cc09743d624c52c192459c31773c6be288144 (patch) | |
tree | 4284c066658321a188a6b0ba5ba736db447637d1 /test_usage.sh | |
parent | db4adfd8be31c253239a54b5ae8a90af46bded7b (diff) | |
download | bugseverywhere-1e8cc09743d624c52c192459c31773c6be288144.tar.gz |
Added darcs support.
I don't know much darcs, so I make no claims about the beauty of my
implementation. It seems to get the job done though, until a darcs
guru comes along.
I also tweaked the libbe.git.Git._rcs_get_user_id to handle the case
where user.name or user.email are not set.
I also added the option to pass a stdin string into the
libbe.rcs.RCS._u_invoke* functions.
Diffstat (limited to 'test_usage.sh')
-rwxr-xr-x | test_usage.sh | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/test_usage.sh b/test_usage.sh index 42c0f2f..b7391d9 100755 --- a/test_usage.sh +++ b/test_usage.sh @@ -23,14 +23,14 @@ then echo "usage: test_usage.sh [RCS]" echo "" echo "where RCS is one of" - for RCS in bzr git hg arch none + for RCS in arch bzr darcs git hg none do echo " $RCS" done exit 1 elif [ $# -eq 0 ] then - for RCS in bzr git hg arch none + for RCS in arch bzr darcs git hg none do echo -e "\n\nTesting $RCS\n\n" $0 "$RCS" || exit 1 @@ -43,21 +43,7 @@ RCS="$1" TESTDIR=`mktemp -d /tmp/BEtest.XXXXXXXXXX` cd $TESTDIR -if [ "$RCS" == "bzr" ] -then - ID=`bzr whoami` - bzr init -elif [ "$RCS" == "git" ] -then - NAME=`git-config user.name` - EMAIL=`git-config user.email` - ID="$NAME <$EMAIL>" - git init -elif [ "$RCS" == "hg" ] -then - ID=`hg showconfig ui.username` - hg init -elif [ "$RCS" == "arch" ] +if [ "$RCS" == "arch" ] then ID=`tla my-id` ARCH_PARAM_DIR="$HOME/.arch-params" @@ -76,6 +62,27 @@ then sed -i 's/^source .*/source ^[._=a-zA-X0-9].*$/' '{arch}/=tagging-method' echo "tla import -A $ARCH_ARCHIVE --summary 'Began versioning'" tla import -A $ARCH_ARCHIVE --summary 'Began versioning' +elif [ "$RCS" == "bzr" ] +then + ID=`bzr whoami` + bzr init +elif [ "$RCS" == "darcs" ] +then + if [ -z "$DARCS_EMAIL" ]; then + export DARCS_EMAIL="J. Doe <jdoe@example.com>" + fi + ID="$DARCS_EMAIL" + darcs init +elif [ "$RCS" == "git" ] +then + NAME=`git-config user.name` + EMAIL=`git-config user.email` + ID="$NAME <$EMAIL>" + git init +elif [ "$RCS" == "hg" ] +then + ID=`hg showconfig ui.username` + hg init elif [ "$RCS" == "none" ] then ID=`id -nu` |