[darcs-users] What if darcs is generating too inclusive of hunks?

Brian Smith brianlsmith at gmail.com
Fri Nov 10 16:41:10 UTC 2006


On 11/9/06, Yuval Kogman <nothingmuch at woobling.org> wrote:
>
> On Thu, Nov 09, 2006 at 10:30:36 -0600, Drew Vogel wrote:
>
> > But darcs is generating a hunk that includes the code that I've
> shortened to [... a ton of code ...] above because it finds the
> "summarize-calls-by-interviewer" text below it. I know I should have
> > made these changes separately, but it's a little late now :) Is there a
> way to make darcs be less aggressive/exhaustive while it is diff'ing?


 I have also experienced cases where darcs seems to generate patches with
too many "false" changes.

Imagine that I was holding a repository in Darcs and Subversion at the same
time. Then, I think it is reasonable to say that, if the patches Darcs
generates are more noisy than the ones CVS and Subversion generates, then
that should be considered a bug in Darcs. I have never had any notable
problems with the way that Subversion's diff works, which is why I think it
is a good benchmark. This is analogous to the GHC performance metric (If GHC
is not faster than everything else, then a bug should be filed).


> Fine tuning is difficult on the algorithm level. See also the bug[s]
> on the tracker requesting the addition of a hunk editor option,
> whereby you can edit the diff lines that are included in the patch.


I do not know if it is possible to improve the diff algorithm, but if it is,
it would be much better to improve the diff algorithm so that such a tool
was not needed.

The real solution is to darcs get the repo to a /tmp dir, edit
> the parts you want, and record. then you can  copy your file to a
> new place in your original working dir, revert, pull from the tmp
> repo, and then move the file over the updated one, and record the
> rest of the change.
>
> It's cumbersome, but I do this often, I have the same problem as you
> ;-)


That means at least three of us have recognized that the diff mechanism is
not working correctly. Let's collect some examples and file a bug.

- Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-users/attachments/20061110/b01ef53b/attachment.htm 


More information about the darcs-users mailing list