Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vcsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
25968c70
Commit
25968c70
authored
Dec 29, 2013
by
Richard Hartmann
Browse files
Options
Downloads
Plain Diff
Merge tag 'v1.20131229-1' into debian-wheezy
Tag v1.20131229-1 Conflicts: debian/changelog
parents
47b72932
1d896540
No related branches found
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+23
-39
23 additions, 39 deletions
README.md
changelog
+7
-0
7 additions, 0 deletions
changelog
debian/changelog
+10
-0
10 additions, 0 deletions
debian/changelog
vcsh
+31
-29
31 additions, 29 deletions
vcsh
with
71 additions
and
68 deletions
README.md
+
23
−
39
View file @
25968c70
...
@@ -70,44 +70,21 @@ modes you will still be fine.
...
@@ -70,44 +70,21 @@ modes you will still be fine.
`vcsh enter`
and
`vcsh run`
will be covered in later sections.
`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
# Overview
...
@@ -280,14 +257,21 @@ the template will be stored.
...
@@ -280,14 +257,21 @@ the template will be stored.
apt-get install mr
apt-get install mr
###
#
Install vcsh
### Install vcsh
#### Debian
#### 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
apt-get install vcsh
#### Gentoo
To install vcsh in Gentoo Linux just give the following command as root:
emerge dev-vcs/vcsh
#### Arch Linux
#### Arch Linux
vcsh is availabe via
[
AUR
](
https://aur.archlinux.org/packages.php?ID=54164
)
vcsh is availabe via
[
AUR
](
https://aur.archlinux.org/packages.php?ID=54164
)
...
...
This diff is collapsed.
Click to expand it.
changelog
+
7
−
0
View file @
25968c70
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>
2013-12-14 Richard Hartmann <richih.mailinglist@gmail.com>
* Release 1.20131214
* Release 1.20131214
...
...
This diff is collapsed.
Click to expand it.
debian/changelog
+
10
−
0
View file @
25968c70
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
vcsh (1.20131214-1~bpo70+1) wheezy-backports; urgency=low
* Rebuild for wheezy-backports.
* Rebuild for wheezy-backports.
...
...
This diff is collapsed.
Click to expand it.
vcsh
+
31
−
29
View file @
25968c70
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
[
-n
"
$VCSH_DEBUG
"
]
&&
set
-vx
[
-n
"
$VCSH_DEBUG
"
]
&&
set
-vx
SELF
=
$(
basename
$0
)
SELF
=
$(
basename
$0
)
VERSION
=
'1.201312
14
'
VERSION
=
'1.201312
29
'
fatal
()
{
fatal
()
{
echo
"
$SELF
: fatal:
$1
"
>
&2
echo
"
$SELF
: fatal:
$1
"
>
&2
...
@@ -53,7 +53,7 @@ source_all() {
...
@@ -53,7 +53,7 @@ source_all() {
# Read configuration and set defaults if anything's not set
# Read configuration and set defaults if anything's not set
[
-n
"
$VCSH_DEBUG
"
]
&&
set
-vx
[
-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
# Read configuration files if there are any
[
-r
"/etc/vcsh/config"
]
&&
.
"/etc/vcsh/config"
[
-r
"/etc/vcsh/config"
]
&&
.
"/etc/vcsh/config"
...
@@ -69,11 +69,11 @@ fi
...
@@ -69,11 +69,11 @@ fi
[
-n
"
$VCSH_DEBUG
"
]
&&
set
-vx
[
-n
"
$VCSH_DEBUG
"
]
&&
set
-vx
# Read defaults
# Read defaults
[
-z
"
$
VCSH_REPO_D
"
]
&&
VCSH_REPO_D
=
"
$XDG_CONFIG_HOME
/vcsh/repo.d
"
:
${
VCSH_REPO_D
:
=
$XDG_CONFIG_HOME
/vcsh/repo.d
}
[
-z
"
$
VCSH_HOOK_D
"
]
&&
VCSH_HOOK_D
=
"
$XD
G
_CONFIG_HOME
/vcsh/hooks-enabled
"
:
${
VCSH_HOOK_D
:
=
$XD
H
_CONFIG_HOME
/vcsh/hooks-enabled
}
[
-z
"
$
VCSH_BASE
"
]
&&
VCSH_BASE
=
"
$HOME
"
:
${
VCSH_BASE
:
=
$HOME
}
[
-z
"
$
VCSH_GITIGNORE
"
]
&&
VCSH_GITIGNORE
=
'
exact
'
:
${
VCSH_GITIGNORE
:
=
exact
}
[
-z
"
$
VCSH_WORKTREE
"
]
&&
VCSH_WORKTREE
=
'
absolute
'
:
${
VCSH_WORKTREE
:
=
absolute
}
if
[
!
"x
$VCSH_GITIGNORE
"
=
'xexact'
]
&&
[
!
"x
$VCSH_GITIGNORE
"
=
'xnone'
]
&&
[
!
"x
$VCSH_GITIGNORE
"
=
'xrecursive'
]
;
then
if
[
!
"x
$VCSH_GITIGNORE
"
=
'xexact'
]
&&
[
!
"x
$VCSH_GITIGNORE
"
=
'xnone'
]
&&
[
!
"x
$VCSH_GITIGNORE
"
=
'xrecursive'
]
;
then
fatal
"'
\$
VCSH_GITIGNORE' must equal 'exact', 'none', or 'recursive'"
1
fatal
"'
\$
VCSH_GITIGNORE' must equal 'exact', 'none', or 'recursive'"
1
...
@@ -247,7 +247,7 @@ list_tracked_by() {
...
@@ -247,7 +247,7 @@ list_tracked_by() {
pull
()
{
pull
()
{
hook pre-pull
hook pre-pull
for
VCSH_REPO_NAME
in
$(
list
)
;
do
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"
export
GIT_DIR
=
"
$VCSH_REPO_D
/
$VCSH_REPO_NAME
.git"
use
use
git pull
git pull
...
@@ -259,7 +259,7 @@ pull() {
...
@@ -259,7 +259,7 @@ pull() {
push
()
{
push
()
{
hook pre-push
hook pre-push
for
VCSH_REPO_NAME
in
$(
list
)
;
do
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"
export
GIT_DIR
=
"
$VCSH_REPO_D
/
$VCSH_REPO_NAME
.git"
use
use
git push
git push
...
@@ -359,8 +359,9 @@ write_gitignore() {
...
@@ -359,8 +359,9 @@ write_gitignore() {
done
|
sort
-u
)
done
|
sort
-u
)
# Contrary to GNU mktemp, mktemp on BSD/OSX requires a template for temp files
# Contrary to GNU mktemp, mktemp on BSD/OSX requires a template for temp files
# Use the template GNU mktemo defaults to
# Using a template makes GNU mktemp default to $PWD and not #TMPDIR for tempfile location
tempfile
=
$(
mktemp
tmp.XXXXXXXXXX
)
||
fatal
"could not create tempfile"
51
# 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
echo
'*'
>
"
$tempfile
"
||
fatal
"could not write to '
$tempfile
'"
57
for
gitignore
in
$gitignores
;
do
for
gitignore
in
$gitignores
;
do
...
@@ -390,22 +391,23 @@ fi
...
@@ -390,22 +391,23 @@ fi
export
VCSH_COMMAND
=
"
$1
"
export
VCSH_COMMAND
=
"
$1
"
[
"
$VCSH_COMMAND
"
=
'clon'
]
||
[
"
$VCSH_COMMAND
"
=
'clo'
]
||
[
"
$VCSH_COMMAND
"
=
'cl'
]
&&
VCSH_COMMAND
=
'clone'
case
"
$VCSH_COMMAND
"
in
[
"
$VCSH_COMMAND
"
=
'commi'
]
||
[
"
$VCSH_COMMAND
"
=
'comm'
]
||
[
"
$VCSH_COMMAND
"
=
'com'
]
||
[
"
$VCSH_COMMAND
"
=
'co'
]
&&
VCSH_COMMAND
=
'commit'
clon|clo|cl
)
VCSH_COMMAND
=
clone
;;
[
"
$VCSH_COMMAND
"
=
'delet'
]
||
[
"
$VCSH_COMMAND
"
=
'dele'
]
||
[
"
$VCSH_COMMAND
"
=
'del'
]
||
[
"
$VCSH_COMMAND
"
=
'de'
]
&&
VCSH_COMMAND
=
'delete'
commi|comm|com|co
)
VCSH_COMMAND
=
commit
;;
[
"
$VCSH_COMMAND
"
=
'ente'
]
||
[
"
$VCSH_COMMAND
"
=
'ent'
]
||
[
"
$VCSH_COMMAND
"
=
'en'
]
&&
VCSH_COMMAND
=
'enter'
delet|dele|del|de
)
VCSH_COMMAND
=
delete
;;
[
"
$VCSH_COMMAND
"
=
'hel'
]
||
[
"
$VCSH_COMMAND
"
=
'he'
]
&&
VCSH_COMMAND
=
'help'
ente|ent|en
)
VCSH_COMMAND
=
enter
;;
[
"
$VCSH_COMMAND
"
=
'ini'
]
||
[
"
$VCSH_COMMAND
"
=
'in'
]
&&
VCSH_COMMAND
=
'init'
hel|he
)
VCSH_COMMAND
=
help
;;
[
"
$VCSH_COMMAND
"
=
'pul'
]
&&
VCSH_COMMAND
=
'pull'
ini|in
)
VCSH_COMMAND
=
init
;;
[
"
$VCSH_COMMAND
"
=
'pus'
]
&&
VCSH_COMMAND
=
'push'
pul
)
VCSH_COMMAND
=
pull
;;
[
"
$VCSH_COMMAND
"
=
'renam'
]
||
[
"
$VCSH_COMMAND
"
=
'rena'
]
||
[
"
$VCSH_COMMAND
"
=
'ren'
]
||
[
"
$VCSH_COMMAND
"
=
're'
]
&&
VCSH_COMMAND
=
'rename'
pus
)
VCSH_COMMAND
=
push
;;
[
"
$VCSH_COMMAND
"
=
'ru'
]
&&
VCSH_COMMAND
=
'run'
renam|rena|ren|re
)
VCSH_COMMAND
=
rename
;;
[
"
$VCSH_COMMAND
"
=
'statu'
]
||
[
"
$VCSH_COMMAND
"
=
'stat'
]
||
[
"
$VCSH_COMMAND
"
=
'sta'
]
||
[
"
$VCSH_COMMAND
"
=
'st'
]
&&
VCSH_COMMAND
=
'status'
ru
)
VCSH_COMMAND
=
run
;;
[
"
$VCSH_COMMAND
"
=
'upgrad'
]
||
[
"
$VCSH_COMMAND
"
=
'upgra'
]
||
[
"
$VCSH_COMMAND
"
=
'upgr'
]
||
[
"
$VCSH_COMMAND
"
=
'upg'
]
&&
VCSH_COMMAND
=
'upgrade'
statu|stat|sta|st
)
VCSH_COMMAND
=
status
;;
[
"
$VCSH_COMMAND
"
=
'versio'
]
||
[
"
$VCSH_COMMAND
"
=
'versi'
]
||
[
"
$VCSH_COMMAND
"
=
'vers'
]
||
[
"
$VCSH_COMMAND
"
=
'ver'
]
||
[
"
$VCSH_COMMAND
"
=
've'
]
&&
VCSH_COMMAND
=
'version'
upgrad|upgra|upgr|up
)
VCSH_COMMAND
=
upgrade
;;
[
"
$VCSH_COMMAND
"
=
'whic'
]
||
[
"
$VCSH_COMMAND
"
=
'whi'
]
||
[
"
$VCSH_COMMAND
"
=
'wh'
]
&&
VCSH_COMMAND
=
'which'
versio|versi|vers|ver|ve
)
VCSH_COMMAND
=
version
;;
[
"
$VCSH_COMMAND
"
=
'write'
]
||
[
"
$VCSH_COMMAND
"
=
'writ'
]
||
[
"
$VCSH_COMMAND
"
=
'wri'
]
||
[
"
$VCSH_COMMAND
"
=
'wr'
]
&&
VCSH_COMMAND
=
'write-gitignore'
which|whi|wh
)
VCSH_COMMAND
=
which
;;
write|writ|wri|wr
)
VCSH_COMMAND
=
write-gitignore
;;
esac
if
[
"
$VCSH_COMMAND
"
=
'clone'
]
;
then
if
[
"
$VCSH_COMMAND
"
=
'clone'
]
;
then
[
-z
"
$2
"
]
&&
fatal
"
$VCSH_COMMAND
: please specify a remote"
1
[
-z
"
$2
"
]
&&
fatal
"
$VCSH_COMMAND
: please specify a remote"
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment