Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authordatastore <foo@bar.org>2009-06-04 23:14:03 (GMT)
committer datastore <foo@bar.org>2009-06-04 23:14:03 (GMT)
commitd5882f5f9d757ea7b72984c85d643379f28abc82 (patch)
tree646213b7b2bf1c31fcd882010bd29211fccbef0d /benchmarks
parent11cc6de393c1217354392c6165295c30c7541fac (diff)
add monotone support
Diffstat (limited to 'benchmarks')
-rwxr-xr-xbenchmarks/checkout4
-rwxr-xr-xbenchmarks/commit7
-rwxr-xr-xbenchmarks/create-branch7
-rwxr-xr-xbenchmarks/create-repo18
-rwxr-xr-xbenchmarks/runbench2
5 files changed, 37 insertions, 1 deletions
diff --git a/benchmarks/checkout b/benchmarks/checkout
index bac9720..4bc1032 100755
--- a/benchmarks/checkout
+++ b/benchmarks/checkout
@@ -41,6 +41,10 @@ case "$vcs" in
cp "${name}" "${dest}"
;;
monotone)
+ cd "${tmpbase}"
+ mtn --db="${repobase}/db.mtn" --branch="org.bar.foo.${name}.${branch}" checkout wd
+ cp wd/"${name}" "${dest}"
+ rm -rf wd
;;
subversion)
svn cat file://"${repo}"/branches/"${branch}"/"${name}" > "${dest}"
diff --git a/benchmarks/commit b/benchmarks/commit
index 0622642..8585820 100755
--- a/benchmarks/commit
+++ b/benchmarks/commit
@@ -54,6 +54,13 @@ case "$vcs" in
hg commit -A -m x
;;
monotone)
+ cd "${tmpbase}"
+ mtn --db="${repobase}/db.mtn" --branch="org.bar.foo.${name}.${branch}" checkout wd
+ cd wd
+ cp "${content}" "${name}"
+ mtn commit -m x
+ cd ..
+ rm -rf wd
;;
subversion)
cd "${tmpbase}"
diff --git a/benchmarks/create-branch b/benchmarks/create-branch
index 2bb19f1..c649d8b 100755
--- a/benchmarks/create-branch
+++ b/benchmarks/create-branch
@@ -63,6 +63,13 @@ case "$vcs" in
hg commit -m x
;;
monotone)
+ cd "${tmpbase}"
+ mtn --db="${repobase}/db.mtn" --branch="org.bar.foo.${name}.${oldbranch}" checkout wd
+ cd wd
+ cp "${content}" "${name}"
+ mtn commit -m x --branch="org.bar.foo.${name}.${newbranch}"
+ cd ..
+ rm -rf wd
;;
subversion)
cd "${tmpbase}"
diff --git a/benchmarks/create-repo b/benchmarks/create-repo
index 8192c78..3af510e 100755
--- a/benchmarks/create-repo
+++ b/benchmarks/create-repo
@@ -76,6 +76,24 @@ case "$vcs" in
hg commit -A -m x
;;
monotone)
+ if [ ! -f "${repobase}/configured" ] ; then
+ mtn db init --db="${repobase}/db.mtn"
+ mkdir "${HOME}/.monotone"
+ cat > "${HOME}/.monotone/monotonerc" << EOF
+function get_passphrase(keypair_id)
+ return "jimsekret"
+end
+EOF
+ mtn genkey foo@bar.org
+ touch "${repobase}/configured"
+ fi
+ mtn --db="${repobase}/db.mtn" --branch="org.bar.foo.${name}.first" setup wd
+ cd wd
+ cp "${content}" "${name}"
+ mtn add "${name}"
+ mtn commit -m x
+ cd ..
+ rm -rf wd
;;
subversion)
svnadmin create "${repo}"
diff --git a/benchmarks/runbench b/benchmarks/runbench
index 953c823..90cc4bc 100755
--- a/benchmarks/runbench
+++ b/benchmarks/runbench
@@ -7,7 +7,7 @@ import sys
import time
-vcsNames=["arch", "bazaar", "cvs", "darcs", "git", "mercurial", "subversion"]
+vcsNames=["arch", "bazaar", "cvs", "darcs", "git", "mercurial", "monotone", "subversion"]
base=os.path.dirname(os.path.abspath(sys.argv[0]))
tmp=os.path.join(base, "tmp")
testfilebase=os.path.join(base, "testfiles")