}
SELF=$(basename $0)
-VERSION='1.3'
+VERSION='1.20130614'
fatal() {
echo "$SELF: fatal: $1" >&2
list-tracked List all files tracked by vcsh
list-tracked-by \\
<repo> List files tracked by a repository
+ pull Pull from all vcsh remotes
+ push Push to vcsh remotes
rename <repo> \\
<newname> Rename repository
run <repo> \\
}
clone() {
+ hook pre-clone
init
git remote add origin "$GIT_REMOTE"
git config branch.master.remote origin
fatal "will stop after fetching and not try to merge!
Once this situation has been resolved, run 'vcsh run $VCSH_REPO_NAME git pull' to finish cloning.\n" 17
git merge origin/master
+ hook post-clone
+ retire
+ hook post-clone-retired
}
delete() {
git ls-files | sort -u
}
+pull() {
+ hook pre-pull
+ for VCSH_REPO_NAME in $(list); do
+ echo -n "$VCSH_REPO_NAME: "
+ export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
+ use
+ git pull
+ done
+ hook post-pull
+}
+
+push() {
+ hook pre-push
+ for VCSH_REPO_NAME in $(list); do
+ echo -n "$VCSH_REPO_NAME: "
+ export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
+ use
+ git push
+ done
+ hook post-push
+}
+
+retire() {
+ unset GIT_WORK_TREE
+ unset VCSH_DIRECTORY
+}
+
rename() {
git_dir_exists
[ -d "$GIT_DIR_NEW" ] && fatal "'$GIT_DIR_NEW' exists" 54
[ "$VCSH_COMMAND" = 'run' ] && shift 2
[ "$VCSH_COMMAND" = 'write-gitignore' ]
elif [ "$1" = 'list' ] ||
- [ "$1" = 'list-tracked' ]; then
+ [ "$1" = 'list-tracked' ] ||
+ [ "$1" = 'pull' ] ||
+ [ "$1" = 'push' ]; then
export VCSH_COMMAND="$1"
elif [ -n "$2" ]; then
export VCSH_COMMAND='run'