[darcs-users] Move many darcs repo to one central location
ptp at lysator.liu.se
Thu Jul 27 09:38:48 UTC 2006
If there are no file name clashes between the repos you can
branch one of them and 'darcs pull' the other one into that
darcs get ~/repo/configs tmp
darcs pull --all ~/repo/scripts
If you really want your home dir to be a darcs repo you can
'darcs init' in it and pull the ~/repo/<something...> repos into
it. But remember darcs might overwrite files in ~ if you do
that, e.g. a ~/repo/configs/dir/file will overwrite any
~/dir/file, and so on.
To get the paths right you can create directories and 'darcs mv'
everything to the right place. If you use ~ you should probably
move the old repos out of the way before you do this, since they
will otherwise "occupy" files in the absolute paths you want to
cd tmp (or ~)
mkdir -p repo/scripts
darcs add repo/scripts
darcs mv <script files...> repo/scripts/
It is perhaps easier to first move the files to the right
relative place in the separate repos, and afterwards pull the
repos together, so you don't have to sort the different files
out by hand.
There is a more "hard to understand" way to do it. Branch copies
of the original repos, 'darcs move' everything to the right
place in the copies. Pull the copies together in a tmp repo.
Remove the old original _darcs dirs (or save them somewhere).
Move the tmp/_darcs dir to ~. That should be it. A 'darcs
whatsnew' should say "no changes". The new ~/_darcs dir has
taken over control of the old repos' working files.
Tommy Pettersson <ptp at lysator.liu.se>
More information about the darcs-users