[darcs-devel] [issue1669] apply => error applying hunk to file (2.3.1)

Eric Kow bugs at darcs.net
Mon Jan 11 17:53:04 UTC 2010


Eric Kow <kowey at darcs.net> added the comment:

First: One thing you should do is to save a copy of the corrupted repo
(perhaps your file681 is good enough) and to try to repair the
corruption.

Darcs repair may not enough to do the job, unfortunately.  You may have
to pull all the good patches and then fix the rest by hand.  We can
schedule an appointment over IRC if you need help with this.

On Mon, Jan 11, 2010 at 17:39:27 +0000, Zooko wrote:
> Hm, some of the patches in this repository were generated by tailor (the patches
> inside the "cryptopp" subdirectory), and maybe they were generated badly. 
> However, "test_ecdsa.py" has never been touched by any tool but emacs/vim and darcs.

So in the corrupted repo, there is one extra whitespace line after this
one:

        s2 = verifier.serialize()

The line has some initial whitespace followed by a newline, which looks
very much like something made with a text editor.

The question is how this whitespace got there in the first place.
I'm not really sure how to pursue this line of inquiry.  Do you have
any ideas?  Does the line of whitespace ring any bells?

One hypothesis is that it got introduced through pristine corruption.
Do you know if there was a time when this repository was using an
old-fashioned format?

For what it's worth, I think the earliest patch which may be based
on the corrupted repo is 

Wed Jun 17 22:10:44 BST 2009  zooko at zooko.com
  * ecdsa: disable ECDSA so that nobody starts to rely on it (the current version works, but isn't ready for long-term support)

> I'm doing an experiment of converting the entire repo from hashed-format to
> darcs-2-format.  Is that a good idea?  I'll post to this ticket once that is done.

No, I think that would confuse matters.

In general, I don't really like a big push for people to switch already
existing repos to the darcs-2 format.  New repos, fine.  But if you've
already got an old repo and you're not actually too concerned about
exponential merge issues (eg you have a small team), then there really
isn't THAT much to gain for the amount of pain involved (you should
definitely be using hashed, though).

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1669>
__________________________________


More information about the darcs-devel mailing list