+cvs_clean =
+ if [ "x$1" = x-f ] ; then
+ shift
+ cvs-clean "$@"
+ else
+ cvs-clean --dry-run "$@"
+ fi
+hg_clean =
+ if [ "x$1" = x-f ] ; then
+ shift
+ hg purge --print --all "$@"
+ hg purge --all "$@"
+ else
+ hg purge --print --all "$@"
+ fi
+fossil_clean =
+ if [ "x$1" = x-f ] ; then
+ shift
+ fossil clean --dry-run --dotfiles --emptydirs "$@"
+ else
+ fossil clean --force --dotfiles --emptydirs "$@"
+ fi
+vcsh_clean =
+ if [ "x$1" = x-f ] ; then
+ shift
+ vcsh run "$MR_REPO" git clean -dx "$@"
+ else
+ vcsh run "$MR_REPO" git clean -dx --dry-run "$@"
+ fi
+
+svn_status = svn status "$@"
+git_status = git status -s "$@" || true; git --no-pager log --branches --not --remotes --simplify-by-decoration --decorate --oneline || true
+bzr_status = bzr status --short "$@"; bzr missing
+cvs_status = cvs -q status | grep -E '^(File:.*Status:|\?)' | grep -v 'Status: Up-to-date'
+hg_status = hg status "$@"; hg summary --quiet | grep -v 'parent: 0:'
+darcs_status = darcs whatsnew -ls "$@" || true
+fossil_status = fossil changes "$@"
+vcsh_status = vcsh run "$MR_REPO" git -c status.relativePaths=false status -s "$@" || true
+veracity_status = vv status "$@"
+
+svn_commit = svn commit "$@"
+git_commit = git commit -a "$@" && git push --all
+bzr_commit =
+ if is_bzr_checkout; then
+ bzr commit "$@"
+ else
+ bzr commit "$@" && bzr push
+ fi
+cvs_commit = cvs commit "$@"
+hg_commit = hg commit "$@" && hg push
+darcs_commit = darcs record -a "$@" && darcs push -a
+fossil_commit = fossil commit "$@"
+vcsh_commit = vcsh run "$MR_REPO" git commit -a "$@" && vcsh run "$MR_REPO" git push --all
+veracity_commit = vv commit "$@" && vv push
+
+git_record = git commit -a "$@"
+bzr_record =
+ if is_bzr_checkout; then
+ bzr commit --local "$@"
+ else
+ bzr commit "$@"
+ fi
+hg_record = hg commit "$@"
+darcs_record = darcs record -a "$@"
+fossil_record = fossil commit "$@"
+vcsh_record = vcsh run "$MR_REPO" git commit -a "$@"
+veracity_record = vv commit "$@"
+
+svn_push = :
+git_push = git push "$@"
+bzr_push = bzr push "$@"
+cvs_push = :
+hg_push = hg push "$@"
+darcs_push = darcs push -a "$@"
+fossil_push = fossil push "$@"
+vcsh_push = vcsh run "$MR_REPO" git push "$@"
+veracity_push = vv push "$@"
+
+svn_diff = svn diff "$@"
+git_diff = git diff "$@"
+bzr_diff = bzr diff "$@"
+cvs_diff = cvs -q diff "$@"
+hg_diff = hg diff "$@"
+darcs_diff = darcs diff -u "$@"
+fossil_diff = fossil diff "$@"
+vcsh_diff = vcsh run "$MR_REPO" git diff "$@"
+veracity_diff = vv diff "$@"
+
+svn_log = svn log "$@"
+git_log = git log "$@"
+bzr_log = bzr log "$@"
+cvs_log = cvs log "$@"
+hg_log = hg log "$@"
+darcs_log = darcs changes "$@"
+git_bare_log = git log "$@"
+fossil_log = fossil timeline "$@"
+vcsh_log = vcsh run "$MR_REPO" git log "$@"
+veracity_log = vv log "$@"
+
+hg_grep = hg grep "$@"
+cvs_grep = ack-grep "$@"
+svn_grep = ack-grep "$@"
+git_svn_grep = git grep "$@"
+git_grep = git grep "$@"
+bzr_grep = ack-grep "$@"
+darcs_grep = ack-grep "$@"
+
+run = "$@"
+
+svn_register =
+ url=`LC_ALL=C svn info . | grep -i '^URL:' | cut -d ' ' -f 2`
+ if [ -z "$url" ]; then
+ error "cannot determine svn url"
+ fi
+ echo "Registering svn url: $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="svn co '$url' '$MR_REPO'"
+git_register =
+ url="`LC_ALL=C git config --get remote.origin.url`" || true
+ if [ -z "$url" ]; then
+ error "cannot determine git url"
+ fi
+ echo "Registering git url: $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="git clone '$url' '$MR_REPO'"
+bzr_register =
+ url="`LC_ALL=C bzr info . | egrep -i 'checkout of branch|parent branch' | awk '{print $NF}' | head -n 1`"
+ if [ -z "$url" ]; then
+ error "cannot determine bzr url"
+ fi
+ echo "Registering bzr url: $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="bzr branch '$url' '$MR_REPO'"
+cvs_register =
+ repo=`cat CVS/Repository`
+ root=`cat CVS/Root`
+ if [ -z "$root" ]; then
+ error "cannot determine cvs root"
+ fi
+ echo "Registering cvs repository $repo at root $root"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="cvs -d '$root' co -d '$MR_REPO' '$repo'"
+hg_register =
+ url=`hg showconfig paths.default`
+ echo "Registering mercurial repo url: $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="hg clone '$url' '$MR_REPO'"
+darcs_register =
+ url=`cat _darcs/prefs/defaultrepo`
+ echo "Registering darcs repository $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="darcs get '$url' '$MR_REPO'"
+git_bare_register =
+ url="`LC_ALL=C GIT_CONFIG=config git config --get remote.origin.url`" || true
+ if [ -z "$url" ]; then
+ error "cannot determine git url"
+ fi
+ echo "Registering git url: $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="git clone --bare '$url' '$MR_REPO'"
+vcsh_register =
+ url="`LC_ALL=C vcsh run "$MR_REPO" git config --get remote.origin.url`" || true
+ if [ -z "$url" ]; then
+ error "cannot determine git url"
+ fi
+ echo "Registering git url: $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="vcsh clone '$url' '$MR_REPO'"
+fossil_register =
+ url=`fossil remote-url`
+ repo=`fossil info | grep repository | sed -e 's/repository:*.//g' -e 's/ //g'`
+ echo "Registering fossil repository $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="mkdir -p '$MR_REPO' && cd '$MR_REPO' && fossil open '$repo'"
+veracity_register =
+ url=`vv config | grep sync_targets | sed -e 's/sync_targets:*.//g' -e 's/ //g'`
+ repo=`vv repo info | grep repository | sed -e 's/Current repository:*.//g' -e 's/ //g'`
+ echo "Registering veracity repository $url in $MR_CONFIG"
+ mr -c "$MR_CONFIG" config "`pwd`" checkout="mkdir -p '$MR_REPO' && cd '$MR_REPO' && vv checkout '$repo'"
+
+svn_trusted_checkout = svn co $url $repo
+svn_alt_trusted_checkout = svn checkout $url $repo
+git_trusted_checkout = git clone $url $repo
+bzr_trusted_checkout = bzr checkout|clone|branch|get $url $repo
+# cvs: too hard
+hg_trusted_checkout = hg clone $url $repo
+darcs_trusted_checkout = darcs get $url $repo
+git_bare_trusted_checkout = git clone --bare $url $repo
+vcsh_old_trusted_checkout = vcsh run "$MR_REPO" git clone $url $repo
+vcsh_trusted_checkout = vcsh clone $url $repo
+# fossil: messy to do
+veracity_trusted_checkout = vv clone $url $repo
+
+