[darcs-users] Merging multi-project repos: Can it be done?
Tom Moertel
tom at moertel.com
Tue Feb 22 18:43:03 UTC 2005
Hi!
When I first started using Darcs, I put all my work files into the root
of the my repos:
/path/to/ProjectA/
_darcs/
Makefile
other
files
here
I have noticed that more experienced users often use this layout:
/path/to/repo/
_darcs/
ProjectX/
Makefile
other
files
here
My hunch is that the second layout is preferred because it avoids
conflicts in the event that two separate projects having a similar
internal structure are pushed to the same remote repo. Each project's
files are partitioned off by its enclosing project directory.
For example, if I had a ProjectB with this layout:
/path/to/ProjectB/
_darcs/
Makefile
and I pushed it to a remote repo that also had ProjectA on it, I would
expect to get conflicts regarding the Makefile. However, if I also had
a ProjectY with this layout:
/path/to/repo2/
_darcs/
ProjectY/
Makefile
I *could* push both it and ProjectX to the same remote repo without
problems. Is that right?
Okay, now on to my real questions:
1. Is there any way to reliably convert repos having the first layout
into the second layout?
While I could use "darcs mv", I do not think that this would prevent
conflicts in the case that projects having similar internal structures
were pushed to the same remote repo. Earlier patches would still likely
conflict because they use the pre-mv file locations, right?
(I was thinking about using a Perl script to rewrite the file locations
in the patches. Would this work?)
2. Assuming that I had pushed both ProjectX and ProjectY to a remote
repo, is there any way to "get" just one of the projects? For example,
could I get ProjectX from the shared-project repo without also getting
ProjectY?
Thanks for your help!
Cheers,
Tom
More information about the darcs-users
mailing list