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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
8f4a012b
Commit
8f4a012b
authored
11 years ago
by
Richard Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add support for `vcsh pull`
This pulls all vcsh repos one after the other.
parent
80176dc2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
_vcsh
+5
-0
5 additions, 0 deletions
_vcsh
doc/vcsh.1.ronn
+5
-0
5 additions, 0 deletions
doc/vcsh.1.ronn
vcsh
+14
-1
14 additions, 1 deletion
vcsh
with
24 additions
and
1 deletion
_vcsh
+
5
−
0
View file @
8f4a012b
...
@@ -43,6 +43,10 @@ function _vcsh-list-tracked-by () {
...
@@ -43,6 +43,10 @@ function _vcsh-list-tracked-by () {
((
CURRENT
==
2
))
&&
__vcsh_repositories
((
CURRENT
==
2
))
&&
__vcsh_repositories
}
}
function
_vcsh-pull
()
{
_nothing
}
function
_vcsh-rename
()
{
function
_vcsh-rename
()
{
((
CURRENT
==
2
))
&&
__vcsh_repositories
((
CURRENT
==
2
))
&&
__vcsh_repositories
((
CURRENT
==
3
))
&&
_message
"new repository name"
((
CURRENT
==
3
))
&&
_message
"new repository name"
...
@@ -88,6 +92,7 @@ function _vcsh () {
...
@@ -88,6 +92,7 @@ function _vcsh () {
"list:list all local vcsh repositories"
"list:list all local vcsh repositories"
"list-tracked:list all files tracked by vcsh"
"list-tracked:list all files tracked by vcsh"
"list-tracked-by:list files tracked by a repository"
"list-tracked-by:list files tracked by a repository"
"pull:pull from all vcsh remotes"
"rename:rename a repository"
"rename:rename a repository"
"run:run command with <
\$
GIT_DIR> and <
\$
GIT_WORK_TREE> set"
"run:run command with <
\$
GIT_DIR> and <
\$
GIT_WORK_TREE> set"
"upgrade:upgrade repository to currently recommended settings"
"upgrade:upgrade repository to currently recommended settings"
...
...
This diff is collapsed.
Click to expand it.
doc/vcsh.1.ronn
+
5
−
0
View file @
8f4a012b
...
@@ -21,6 +21,8 @@ vcsh(1) - Version Control System for $HOME - multiple Git repositories in $HOME
...
@@ -21,6 +21,8 @@ vcsh(1) - Version Control System for $HOME - multiple Git repositories in $HOME
`vcsh` list-tracked-by <repo>
`vcsh` list-tracked-by <repo>
`vcsh` pull
`vcsh` rename <repo> <newname>
`vcsh` rename <repo> <newname>
`vcsh` run <repo> <shell command>
`vcsh` run <repo> <shell command>
...
@@ -98,6 +100,9 @@ an interactive user.
...
@@ -98,6 +100,9 @@ an interactive user.
* list-tracked-by:
* list-tracked-by:
List files tracked by a repository.
List files tracked by a repository.
* pull:
Pull from all vcsh remotes.
* rename:
* rename:
Rename a repository.
Rename a repository.
...
...
This diff is collapsed.
Click to expand it.
vcsh
+
14
−
1
View file @
8f4a012b
...
@@ -100,6 +100,7 @@ help() {
...
@@ -100,6 +100,7 @@ help() {
list-tracked List all files tracked by vcsh
list-tracked List all files tracked by vcsh
list-tracked-by
\\
list-tracked-by
\\
<repo> List files tracked by a repository
<repo> List files tracked by a repository
pull Pull from all vcsh remotes
rename <repo>
\\
rename <repo>
\\
<newname> Rename repository
<newname> Rename repository
run <repo>
\\
run <repo>
\\
...
@@ -222,6 +223,17 @@ list_tracked_by() {
...
@@ -222,6 +223,17 @@ list_tracked_by() {
git ls-files |
sort
-u
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
}
rename
()
{
rename
()
{
git_dir_exists
git_dir_exists
[
-d
"
$GIT_DIR_NEW
"
]
&&
fatal
"'
$GIT_DIR_NEW
' exists"
54
[
-d
"
$GIT_DIR_NEW
"
]
&&
fatal
"'
$GIT_DIR_NEW
' exists"
54
...
@@ -328,7 +340,8 @@ elif [ "$1" = 'delete' ] ||
...
@@ -328,7 +340,8 @@ elif [ "$1" = 'delete' ] ||
[
"
$VCSH_COMMAND
"
=
'run'
]
&&
shift
2
[
"
$VCSH_COMMAND
"
=
'run'
]
&&
shift
2
[
"
$VCSH_COMMAND
"
=
'write-gitignore'
]
[
"
$VCSH_COMMAND
"
=
'write-gitignore'
]
elif
[
"
$1
"
=
'list'
]
||
elif
[
"
$1
"
=
'list'
]
||
[
"
$1
"
=
'list-tracked'
]
;
then
[
"
$1
"
=
'list-tracked'
]
||
[
"
$1
"
=
'pull'
]
;
then
export
VCSH_COMMAND
=
"
$1
"
export
VCSH_COMMAND
=
"
$1
"
elif
[
-n
"
$2
"
]
;
then
elif
[
-n
"
$2
"
]
;
then
export
VCSH_COMMAND
=
'run'
export
VCSH_COMMAND
=
'run'
...
...
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