diff --git a/Makefile b/Makefile index b40c618fa851f98247fa8840679ecbbb2bf606a4..f68bd97c4568de896490a93dd6c4aea81dbf931e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PREFIX=/usr +PREFIX?=/usr DOCDIR_PREFIX=$(PREFIX)/share/doc DOCDIR=$(DOCDIR_PREFIX)/$(self) ZSHDIR=$(PREFIX)/share/zsh/vendor-completions diff --git a/_vcsh b/_vcsh index 47dbd9e69a9582540c563cfc27c0362fc046d453..a33551bece27c8fe84f8ede4a94eedf0c2492d3d 100644 --- a/_vcsh +++ b/_vcsh @@ -89,6 +89,7 @@ function _vcsh () { subcommands=( "clone:clone an existing repository" + "commit:commit in all repositories" "delete:delete an existing repository" "enter:enter repository; spawn new <\$SHELL>" "help:display help" @@ -97,8 +98,10 @@ function _vcsh () { "list-tracked:list all files tracked by vcsh" "list-tracked-by:list files tracked by a repository" "pull:pull from all vcsh remotes" + "push:push to vcsh remotes" "rename:rename a repository" "run:run command with <\$GIT_DIR> and <\$GIT_WORK_TREE> set" + "status:show statuses of all/one vcsh repositories" "upgrade:upgrade repository to currently recommended settings" "version:print version information" "which:find <substring> in name of any tracked file" diff --git a/changelog b/changelog index 3e8029ed86d88a6fe661a8389b165bd7757928c9..1c09b670bac1b13df74eefb459f8153c39f23af1 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +2014-10-09 Richard Hartmann <richih.mailinglist@gmail.com> + + * Display full paths in list-tracked* + * Lots of help improvements + 2014-05-08 Richard Hartmann <richih.mailinglist@gmail.com> * Revert "Introduce static manpage as part of normal repo" diff --git a/doc/README.md b/doc/README.md index 0fc717a5404648372aa71c8e10bed81508abffcd..b14d782e50a428afc403d56a0ac37594949b34b3 100644 --- a/doc/README.md +++ b/doc/README.md @@ -117,7 +117,7 @@ your `$HOME`, you will end up with a lot of repositories very quickly. `vcsh` was designed with [myrepos][myrepos], a tool to manage Multiple Repositories, in mind and the two integrate very nicely. The myrepos tool (`mr`) has native support for `vcsh` repositories and the configuration for -myrepos is just another set of files that you cat track with `vcsh` like any +myrepos is just another set of files that you can track with `vcsh` like any other. This makes setting up any new machine a breeze. It can take literally less than five minutes to go from standard installation to fully set up system. @@ -128,7 +128,7 @@ of myrepos is technically optional, it will be an integral part of the proposed system that follows. For instance, you can use [myrepos][myrepos] to track repositories in home such as `.emacs.d`, which `mr` can clone and update for you automatically. To do this, -just add a `mr` configuration file to `availabile.d` with a `checkout` +just add a `mr` configuration file to `available.d` with a `checkout` command to clone the repo, and set the [title] to the desired location, e.g. `$HOME/.emacs.d`. Try the `mr register` command in an existing repository, then view `~/.mrconfig` for an example. @@ -220,7 +220,7 @@ this document (see above). vcsh will check if any file it would want to create exists. If it exists, vcsh will throw a warning and exit. Move away your old config and try again. Optionally, merge your local and your global configs afterwards and push with -`vcsh foo push`. +`vcsh repo_name push`. ## Moving into a New Host @@ -351,14 +351,15 @@ Now, it's time to edit the template config and fill it with your own remotes: And then create your own stuff: - vcsh init foo - vcsh foo add bar baz quux - vcsh foo remote add origin git://quuux - vcsh foo commit - vcsh foo push - cp $XDG_CONFIG_HOME/mr/available.d/mr.vcsh $XDG_CONFIG_HOME/mr/available.d/foo.vcsh - vim $XDG_CONFIG_HOME/mr/available.d/foo.vcsh # add your own repo + vcsh init repo_name + vcsh repo_name add bar baz quux + vcsh repo_name remote add origin git://quuux + vcsh repo_name commit + vcsh repo_name push + + cp $XDG_CONFIG_HOME/mr/available.d/mr.vcsh $XDG_CONFIG_HOME/mr/available.d/repo_name.vcsh + vim $XDG_CONFIG_HOME/mr/available.d/repo_name.vcsh # add your own repo Done! @@ -427,9 +428,9 @@ Neat. After you have made some changes, for which you would normally use `git add` and `git commit`, use the vcsh wrapper (like above): - vcsh foo add bar baz quux - vcsh foo commit - vcsh foo push + vcsh repo_name add bar baz quux + vcsh repo_name commit + vcsh repo_name push ### Using vcsh without myrepos diff --git a/vcsh b/vcsh index b675edd1d4e81d4fc7459bd27d500ad716ab2aa7..6a81343cf8ec188b1a8aeda2fe6495afb51cd85a 100755 --- a/vcsh +++ b/vcsh @@ -19,7 +19,7 @@ # If '.git-HEAD' is appended to the version, you are seeing an unreleased # version of vcsh; the master branch is supposed to be clean at all times # so you can most likely just use it nonetheless -VERSION='1.20140508' +VERSION='1.20141009' SELF=$(basename $0) fatal() { @@ -161,7 +161,7 @@ clone() { done [ x"$VCSH_CONFLICT" = x'1' ]) && 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." 17 + Once this situation has been resolved, run 'vcsh $VCSH_REPO_NAME pull' to finish cloning." 17 git merge origin/master hook post-merge hook post-clone @@ -244,12 +244,14 @@ get_files() { list_tracked() { for VCSH_REPO_NAME in $(list); do get_files - done | sort -u + done | sed "s,^,$(printf '%s\n' "$VCSH_BASE/" | \ + sed 's/[,\&]/\\&/g')," | sort -u } list_tracked_by() { use - git ls-files | sort -u + git ls-files | sed "s,^,$(printf '%s\n' "$VCSH_BASE/" | \ + sed 's/[,\&]/\\&/g')," | sort -u } pull() {