[darcs-devel] darcs patch: Unsafe pull_firsts_middles
optimisation (and 7 more)
Ian Lynagh
igloo at earth.li
Sat May 7 08:47:25 PDT 2005
On Sat, May 07, 2005 at 08:28:09AM -0400, David Roundy wrote:
> On Fri, May 06, 2005 at 11:15:25PM +0100, Ian Lynagh wrote:
>
> darcs add foo
> rm foo
> darcs record --all
>
> I think your code would prompt you first for the add and then for the
> remove (which was discovered during the diff).
Ah, hmm, thanks.
> The only way I can imagine to efficiently handle this situation would be
> through some sort of a pre-processing step, where we could look through
> pending and remove any adds that don't correspond to an actual file in the
> working directory. Actually, this could perhaps be done in read_pending
> itself? It'd require a bit of care with respect to file and directory
> renames, but not much.
A few more ideas:
* Have a command line flag --non-sorted. This isn't useful in the common
case (when you want all the changes) as you may as well just say --all
instead, so is a non-starter really.
* Do something more like "merge (sort pending) diff" than
"sort (pending ++ diff)" (this relies on diff being sorted in the same
way the patch sorting is done, but I think that should be true).
* Have the slurping and diffing take pending into account. This might
make the slurpy code less pleasant, but it would make things nicer
here.
I think it would be worth waiting to see what the slurpy code looks
like, and where it is still used, after the cleanup discussed in another
thread before we decide which to do.
I think in the mean time I'll apply the patches I have at the moment to
stop conflicts building up.
Thanks
Ian
More information about the darcs-devel
mailing list