Ok, after staring at this patch a bit, I think I mostly understand it (and know a bit more about resolution).
I have some comments and questions below. There's one part I don't
understand so well, and if you could explain it to me, I think I'd be
willing to apply the patch next week.
> +apply_to_slurpy_or_fail :: Patch -> Slurpy -> IO Slurpy
> +apply_to_slurpy_or_fail p s =3D case withSlurpy s (apply [] False p) of
> + Left err -> error err
Do we really want error here, and not fail? Is it darcs going wrong or
just something unexpected happening?
If it's fail that we want, perhaps we should just generalise it
apply_to_slurpy :: (Monad m) => Patch -> Slurpy -> m Slurpy
Eric makes sure he understands
------------------------------
The goal is to make it faster for the user to resolve patch conflicts
with an external tool like FileMerge or Meld. Darcs does this by
copying everything to temporary directories:
version1 - essentially the current working directory (has p1 in it)
ancestor - common ancestor to both p1 and p2 (anti-p1 on version1)
version2 - the other guy (p2 on ancestor)
merged - version1 merged with version2 à la darcs (the
conflicting parts are identical to ancestor)
cleanmerged - a copy of merged
The user's external merge tool modifies merged to the user's taste. For
darcs to learn the user's choices, it diffs cleanmerged with merged.
Edwin's patch improves on this siutation by copying less stuff to
version1, version2, ancestor and merged. Rather than copy the whole
working directory, he only copies the files that were affected by the
conflict.
Note that moves are handled correctly, because of that matches up the
names of files in their version1, ancestor, and version2 state.
Edwin: can you explain to me what happens when files get added or
removed? I assume that the filenames part is ok, because it hasn't
changed from the original code, but does the right thing happen
wrt to write_files?
--
Eric Kow http://www.loria.fr/~kow
PGP Key ID: 08AC04F9 Merci de corriger mon français.
pgpnbLfpd94Bx.pgp
Description: PGP signature
_______________________________________________ darcs-devel mailing list [email protected] http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
