trying out vcsh

Richard Hartmann richih.mailinglist at
Mon Feb 6 18:50:35 CET 2012

On Mon, Feb 6, 2012 at 01:16, Brian May <brian at> wrote:

> Previously I managed my configuration using the "most trendy" vcs
> available (ie. starting with rcs!) and using my set of scripts to
> customize the configuration for every host.

Aye, been there, done that ;)

> 1. Instructions should perhaps link to
> instead of the email
> address.

Fixed in master

> 2. I found following the instructions for creating new repositories
> insufficient (section 4.1.4); I also had to add the following to
> $HOME/.config/vcsh/repo.d/foo.git/config:
> [branch "master"]
>        remote = origin
>        merge = refs/heads/master
> otherwise "mr pull" won't work. Is there an easier way to make this
> change, e.g. using git command line?

Yes, use
  vcsh run foo git config ...

> 3. If I accidentally add a repository I didn't want, is there an easy
> way of removing it and the checked out files? Maybe this is what vcsh
> delete is meant to do?


> 4. What is the recommended practise for $HOME/.gitignore? I found this
> file on one host only, and it is not committed anywhere. Should I be
> adding it to a repository?

vcsh will change your repo's configs to refer to .gitignore.d/foo, instead.
This is done to avoid conflicts.

> 5. Suspect this is related to 4; am concerned about the possibility
> that I might accidentally commit the same file to two different
> repositories. For example by running git add on the wrong repository.
> Are there any safe guards to prevent this from happening?

Yes-ish. The gitignore setup vcsh does for you will guard against most mistakes.
Still, I have been thinking about this topic recently, but I didn't
come up with a definite answer on what to do in the long term, yet.
Fwiw, I will most likely implement something like `vcsh whereis` that
tells you in what repo a file lives, soonish.

> 6. Would it be possible to implement commands that, assuming the file
> is already committed to an active repository, automatically work out
> this repository from the list of files? e.g.

Possible, but I am not sure if that's within the scope of vcsh.

whereis will do part of what you want and you can script around this.
Usually, you would do

  vcsh enter foo
  git add file
  git commit
  other stuff
  yet more stuff
  git commit -a

> 7. I can see why it is done this way, but not entirely comfortable
> with having duplicate information about repositories (e.g. the
> upstream repository) both in $HOME/.config/mr/available.d and
> $HOME/.config/vcsh/repo.d . For example, if you want to change to
> upstream repository, it becomes clumsy to do so; I think every host
> would have to be updated manually (at least the repo.d directories).
> Similarly, when a repository is activated, there are two places that
> have to be changed to reflect this that could become inconsistent with
> each other. Still thinking about this issue.

$HOME/.config/mr/available.d holds the configs
$HOME/.config/mr/config.d holds the configs activated on this host
$HOME/.config/vcsh/repo.d holds the actual repo

If there's anything else, just ask :)


More information about the vcs-home mailing list