[darcs-users] multiple libraries question
zooko at zooko.com
zooko at zooko.com
Mon Mar 27 13:23:29 UTC 2006
> I have project P. It uses a library L. I want to maintain the source for L
> separately from P, since L is shared by other projects.
>
> I suppose the simple approach is that I need to fetch L and then fetch P if
> I want to build the latest P.
>
> Is there a better way? Namely, a way that fetching P would automatically
> update L?
I have a directory for the project: $P, and then a subdirectory named "libs",
and then "libs/$L". The way I set this up is to go into your L repository and
"darcs mv" everything in it into a subdirectory named "$L".
Then go into P and pull all the patches from L into P. Everything will be in a
subdirectory named $P/$L. Now mkdir libs, darcs add libs, darcs mv $L libs.
There is one potential problem: if at some point in the past, there existed a
file in the L repository named "./$F", for any filename F, and there also
existed a file in the P repository named "./$F", then pulling the two repos
together will cause a merge conflict and possibly a lock-up, even though L's F
*now* lives in "./$L/$F".
That is why for *all* darcs repositories that I ever create (and that is a
lot), I never "darcs add" any file in the root directory.
Regards,
Zooko
More information about the darcs-users
mailing list