[darcs-users] Finding patches that span multiple subdirectories

Petr Rockai me at mornfall.net
Sun Jul 19 13:47:20 UTC 2009


Yitzchak Gale <gale at sefer.org> writes:
> Unfortunately, there were 14 hits. 3 of those were just noise generated
> by a few straggler files still left in the root of the repo, but the other
> 11 were actually patches than spanned 2 or more subdirectories.
> Bummer.

Well, for all the subdirs that do not have such a spanner, you can quite
cheaply separate them out, for the rest, you should still be able to use tailor
on the reduced repository (with the non-spanned directories removed). This
should hopefully work relatively well.

Another option would be to check how many patches depend on those spanners and
maybe re-do these.

Yet another option would be to take advantage of the new darcs 2
semantics. Please note that this is risky, as this is a somewhat uncharted
repository. The way you would do this is:

To eliminate a single spanner: get a repository that has the spanner as a last
patch: then unrecord the spanner, record two separate patches (one per
repository), then pull back the spanner: you should get no conflict, due to
duplicate handling. Then you can pull back the remaining patches up to next
spanner and repeat the process. At the end, you should get a repository, where
all the spanners consist completely of duplicate hunks. You can then proceed to
obliterate all the spanner patches and keeping all the rest (even patches that
previously depended on the spanners). However, NOTE WELL: This will likely
break repository compatibility. You need the repository to be darcs-2
format. It has not been tested very well in practice. And *definitely* do a
number of checks against the new repos before you choose to rely on them.

Yours,
   Petr.


More information about the darcs-users mailing list