[darcs-users] "core.worktree" in Darcs?
Ben Franksen
benjamin.franksen at bessy.de
Mon Aug 13 18:57:49 UTC 2012
Joshua Tilles wrote:
> I'd been looking for something with which to explore using Darcs, and
> right now I'm trying to set up using Darcs on my dotfiles. I really like
> Eli Barzilay's
> approach<http://www.xxeo.com/archives/2010/02/16/dotfiles-in-git-finally-
did-it.html/comment-page-1#comment-126903>
> to putting his dotfiles under source control, but his description is
> Git-specific.
>
> A pre-emptive thanks for any help!
> --Josh
>
>
> *TLDR;*
> Can I make some repo /foo/bar/_darcs "watch" the directory /foo rather
> than watching /foo/bar?
I don't think so. I may be wrong but I believe darcs only ever knows of
files 'below' the one that contains the _darcs directory.
The problem in general is this: you want to keep file X that has a fixed
location in the file system under version control but you do not want
everything under the parent directory of X to be considered to be
potentially part of the same repo. This is especially true if the directory
in question is your home directory. Otherwise if you happen to issue 'darcs
whatsnew -l' somewhere in your home folder that is not part of some darcs
repo, you will (after waiting for several minutes) get a HUGE list (all
files anywhere under you home).
At work I am using the following solution (not for ~/.xyz but in a similar
situation):
I create a subdirectory e.g. ~/dotfiles, put the repository and all the
files I want to keep under version control there, and then create symbolic
links in the home directory to the files in the ~/dotfiles subdirectory.
The creation of all the symbolic links can be automated with a simple shell
script, e.g.
cd $HOME/dotfiles
foreach f in .*; do ln -s $HOME/dotfiles/$f $HOME/$f; done
(warning: not tested)
Cheers
Ben
More information about the darcs-users
mailing list