[darcs-users] splitting a repo

Juliusz Chroboczek jch at pps.jussieu.fr
Wed Jan 5 19:49:03 UTC 2005


> > Is it possible to split out dir_b into its own repo while keeping the 
> > history?

Thomas Zander:

> Try this approuch:
> 
>     get repo  first
>     cd first
>     rm -rf dir_b
>     darcs record -am "Split dir_b into its own repo"
> 
> and do that again for the second repo but repove dir_a there.

Note however that if you do that, both repos will still contain the
complete history up to the split.  The only way to avoid the bloat is
to create a checkpoint (darcs optimize --checkpoint) and then get a
partial clone (darcs get --partial), hence losing history.

A workaround (sibling repositories) is planned for as soon as the
I'm-doing-Real-Work-and-have-no-energy-left-for-hacking season is
over, but it's just a workaround.  There is no good solution within
the current version of David's patch theory (see below).

Tommy Pettersson:

> You can clone the repo (with 'darcs get') and unpull in each all
> patches not confined to that sub repo. Any patch
> touching both dir_a and dir_b, such as all tags, will make
> this impossible.

Exactly.  Solving this is not a simple matter of hacking -- what we
need is a way to split and merge patches without breaking commutation,
something which might or might not exist.

                                        Juliusz




More information about the darcs-users mailing list