Skip to main content
Sign in
Snippets Groups Projects
Commit 25968c70 authored by Richard Hartmann's avatar Richard Hartmann
Browse files

Merge tag 'v1.20131229-1' into debian-wheezy

Tag v1.20131229-1

Conflicts:
	debian/changelog
parents 47b72932 1d896540
No related branches found
Tags
No related merge requests found
......@@ -70,44 +70,21 @@ modes you will still be fine.
`vcsh enter` and `vcsh run` will be covered in later sections.
## Initialize a new repository called "vim"
| Task | Command |
| ----------------------------------------------------- | ------------------------------------------------- |
| _Initialize a new repository called "vim"_ | `vcsh init vim` |
| _Clone an existing repository_ | `vcsh clone <remote> <repository_name>` |
| _Add files to repository "vim"_ | `vcsh vim add ~/.vimrc ~/.vim` |
| | `vcsh vim commit -m 'Update Vim configuration'` |
| _Add a remote for repository "vim"_ | `vcsh vim remote add origin <remote>` |
| | `vcsh vim push origin master:master` |
| | `vcsh vim branch --track master origin/master` |
| _Push to remote of repository "vim"_ | `vcsh vim push` |
| _Pull from remote of repository "vim"_ | `vcsh vim pull` |
| _Show status of changed files in all repositories_ | `vcsh status` |
| _Pull from all repositories_ | `vcsh pull` |
| _Push to all repositories_ | `vcsh push` |
vcsh init vim
## Clone an existing repository
vcsh clone <remote> <repository_name>
## Add files to repository "vim"
vcsh vim add ~/.vimrc ~/.vim
vcsh vim commit -m 'Update Vim configuration'
## Add a remote for repository "vim"
vcsh vim remote add origin <remote>
vcsh vim push origin master:master
vcsh vim branch --track master origin/master
## Push to remote of repository "vim"
vcsh vim push
## Pull from remote of repository "vim"
vcsh vim pull
## Show status of changed files in all repositories
vcsh status
## Pull from all repositories
vcsh pull
## Push to all repositories
vcsh push
# Overview
......@@ -280,14 +257,21 @@ the template will be stored.
apt-get install mr
#### Install vcsh
### Install vcsh
#### Debian
If you are using Debian Squeeze, you will need to enable backports
If you are using Debian Squeeze, you will need to enable backports.
From Wheezy onwards, you can install it directly:
apt-get install vcsh
#### Gentoo
To install vcsh in Gentoo Linux just give the following command as root:
emerge dev-vcs/vcsh
#### Arch Linux
vcsh is availabe via [AUR](https://aur.archlinux.org/packages.php?ID=54164)
......
......
2013-12-29 Richard Hartmann <richih.mailinglist@gmail.com>
* Release 1.20131229
* Fix mktemp bug (GitHub issue #99)
* Make code more resilient and efficient
* Improve output
2013-12-14 Richard Hartmann <richih.mailinglist@gmail.com>
* Release 1.20131214
......
......
vcsh (1.20131229-1) unstable; urgency=low
* New upstream release
+ Release 1.20131229
+ Fix mktemp bug (GitHub issue #99)
+ Make code more resilient and efficient
+ Improve output
-- Richard Hartmann <richih@debian.org> Sun, 29 Dec 2013 17:35:42 +0100
vcsh (1.20131214-1~bpo70+1) wheezy-backports; urgency=low
* Rebuild for wheezy-backports.
......
......
......@@ -16,7 +16,7 @@
[ -n "$VCSH_DEBUG" ] && set -vx
SELF=$(basename $0)
VERSION='1.20131214'
VERSION='1.20131229'
fatal() {
echo "$SELF: fatal: $1" >&2
......@@ -53,7 +53,7 @@ source_all() {
# Read configuration and set defaults if anything's not set
[ -n "$VCSH_DEBUG" ] && set -vx
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
: ${XDG_CONFIG_HOME:=$HOME/.config}
# Read configuration files if there are any
[ -r "/etc/vcsh/config" ] && . "/etc/vcsh/config"
......@@ -69,11 +69,11 @@ fi
[ -n "$VCSH_DEBUG" ] && set -vx
# Read defaults
[ -z "$VCSH_REPO_D" ] && VCSH_REPO_D="$XDG_CONFIG_HOME/vcsh/repo.d"
[ -z "$VCSH_HOOK_D" ] && VCSH_HOOK_D="$XDG_CONFIG_HOME/vcsh/hooks-enabled"
[ -z "$VCSH_BASE" ] && VCSH_BASE="$HOME"
[ -z "$VCSH_GITIGNORE" ] && VCSH_GITIGNORE='exact'
[ -z "$VCSH_WORKTREE" ] && VCSH_WORKTREE='absolute'
: ${VCSH_REPO_D:=$XDG_CONFIG_HOME/vcsh/repo.d}
: ${VCSH_HOOK_D:=$XDH_CONFIG_HOME/vcsh/hooks-enabled}
: ${VCSH_BASE:=$HOME}
: ${VCSH_GITIGNORE:=exact}
: ${VCSH_WORKTREE:=absolute}
if [ ! "x$VCSH_GITIGNORE" = 'xexact' ] && [ ! "x$VCSH_GITIGNORE" = 'xnone' ] && [ ! "x$VCSH_GITIGNORE" = 'xrecursive' ]; then
fatal "'\$VCSH_GITIGNORE' must equal 'exact', 'none', or 'recursive'" 1
......@@ -247,7 +247,7 @@ list_tracked_by() {
pull() {
hook pre-pull
for VCSH_REPO_NAME in $(list); do
echo -n "$VCSH_REPO_NAME: "
printf "$VCSH_REPO_NAME: "
export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
use
git pull
......@@ -259,7 +259,7 @@ pull() {
push() {
hook pre-push
for VCSH_REPO_NAME in $(list); do
echo -n "$VCSH_REPO_NAME: "
printf "$VCSH_REPO_NAME: "
export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
use
git push
......@@ -359,8 +359,9 @@ write_gitignore() {
done | sort -u)
# Contrary to GNU mktemp, mktemp on BSD/OSX requires a template for temp files
# Use the template GNU mktemo defaults to
tempfile=$(mktemp tmp.XXXXXXXXXX) || fatal "could not create tempfile" 51
# Using a template makes GNU mktemp default to $PWD and not #TMPDIR for tempfile location
# To make every OS happy, set full path explicitly
tempfile=$(mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX") || fatal "could not create tempfile: '${tempfile}'" 51
echo '*' > "$tempfile" || fatal "could not write to '$tempfile'" 57
for gitignore in $gitignores; do
......@@ -390,22 +391,23 @@ fi
export VCSH_COMMAND="$1"
[ "$VCSH_COMMAND" = 'clon' ] || [ "$VCSH_COMMAND" = 'clo' ] || [ "$VCSH_COMMAND" = 'cl' ] && VCSH_COMMAND='clone'
[ "$VCSH_COMMAND" = 'commi' ] || [ "$VCSH_COMMAND" = 'comm' ] || [ "$VCSH_COMMAND" = 'com' ] || [ "$VCSH_COMMAND" = 'co' ] && VCSH_COMMAND='commit'
[ "$VCSH_COMMAND" = 'delet' ] || [ "$VCSH_COMMAND" = 'dele' ] || [ "$VCSH_COMMAND" = 'del' ] || [ "$VCSH_COMMAND" = 'de' ] && VCSH_COMMAND='delete'
[ "$VCSH_COMMAND" = 'ente' ] || [ "$VCSH_COMMAND" = 'ent' ] || [ "$VCSH_COMMAND" = 'en' ] && VCSH_COMMAND='enter'
[ "$VCSH_COMMAND" = 'hel' ] || [ "$VCSH_COMMAND" = 'he' ] && VCSH_COMMAND='help'
[ "$VCSH_COMMAND" = 'ini' ] || [ "$VCSH_COMMAND" = 'in' ] && VCSH_COMMAND='init'
[ "$VCSH_COMMAND" = 'pul' ] && VCSH_COMMAND='pull'
[ "$VCSH_COMMAND" = 'pus' ] && VCSH_COMMAND='push'
[ "$VCSH_COMMAND" = 'renam' ] || [ "$VCSH_COMMAND" = 'rena' ] || [ "$VCSH_COMMAND" = 'ren' ] || [ "$VCSH_COMMAND" = 're' ] && VCSH_COMMAND='rename'
[ "$VCSH_COMMAND" = 'ru' ] && VCSH_COMMAND='run'
[ "$VCSH_COMMAND" = 'statu' ] || [ "$VCSH_COMMAND" = 'stat' ] || [ "$VCSH_COMMAND" = 'sta' ] || [ "$VCSH_COMMAND" = 'st' ] && VCSH_COMMAND='status'
[ "$VCSH_COMMAND" = 'upgrad' ] || [ "$VCSH_COMMAND" = 'upgra' ] || [ "$VCSH_COMMAND" = 'upgr' ] || [ "$VCSH_COMMAND" = 'upg' ] && VCSH_COMMAND='upgrade'
[ "$VCSH_COMMAND" = 'versio' ] || [ "$VCSH_COMMAND" = 'versi' ] || [ "$VCSH_COMMAND" = 'vers' ] || [ "$VCSH_COMMAND" = 'ver' ] || [ "$VCSH_COMMAND" = 've' ] && VCSH_COMMAND='version'
[ "$VCSH_COMMAND" = 'whic' ] || [ "$VCSH_COMMAND" = 'whi' ] || [ "$VCSH_COMMAND" = 'wh' ] && VCSH_COMMAND='which'
[ "$VCSH_COMMAND" = 'write' ] || [ "$VCSH_COMMAND" = 'writ' ] || [ "$VCSH_COMMAND" = 'wri' ] || [ "$VCSH_COMMAND" = 'wr' ] && VCSH_COMMAND='write-gitignore'
case "$VCSH_COMMAND" in
clon|clo|cl) VCSH_COMMAND=clone;;
commi|comm|com|co) VCSH_COMMAND=commit;;
delet|dele|del|de) VCSH_COMMAND=delete;;
ente|ent|en) VCSH_COMMAND=enter;;
hel|he) VCSH_COMMAND=help;;
ini|in) VCSH_COMMAND=init;;
pul) VCSH_COMMAND=pull;;
pus) VCSH_COMMAND=push;;
renam|rena|ren|re) VCSH_COMMAND=rename;;
ru) VCSH_COMMAND=run;;
statu|stat|sta|st) VCSH_COMMAND=status;;
upgrad|upgra|upgr|up) VCSH_COMMAND=upgrade;;
versio|versi|vers|ver|ve) VCSH_COMMAND=version;;
which|whi|wh) VCSH_COMMAND=which;;
write|writ|wri|wr) VCSH_COMMAND=write-gitignore;;
esac
if [ "$VCSH_COMMAND" = 'clone' ]; then
[ -z "$2" ] && fatal "$VCSH_COMMAND: please specify a remote" 1
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment