[darcs-users] Unapplicable patch: erro

Gour gour at mail.inet.hr
Mon Sep 13 20:27:07 UTC 2004


David Roundy (droundy at abridgegame.org) wrote:

> Moving back to list, since this might be relevant to other people.

It's OK.

> Just to cover all bases, might it be that your friend's code that he sent
> you already had the corruption in it? I don't want to go on a wild kdiff3
> goose chase...

Nope. We cannot count on this one :-)

> This could be.  Darcs creates four clean copies of the tree when doing an
> external resolve, one ancestor, two changed versions and a tree for the
> final merged version.  It may be that kdiff3 is somehow creating ".old"
> files in one of these directories, which could have created a problem.  On
> the other hand, in the code I don't see how that could cause a repo
> inconsistency--all I can imagine is that you'd end up with a bunch of
> ".old" files in your working directory.

I just found out who is making trouble with *.old files. It's my web editor -
Quanta.

> Could you experiment perhaps with kdiff3 and see when (if ever) if creates
> .old files?  Preferably with something like the command line used with
> darcs, with the four files involved being each named the same thing, but in
> different directories.

I just did one simple global search & replace on few files and for every file
where something is replaced, Quanta creates *.old file.

> Well, I don't think a problem with kdiff3 should be *able* to cause this
> effect (corruption in the repo) so there must be a bug in darcs itself.
> It's just hard to see where that bug might be.  :(

Does the above mentioned info helps you somewhat?

OK. Here is a test case.

I created a simple test.html file, added & recorded in a darcs:

gour at gaura ~/repos/diff $ darcs add -v test.html
Adding 'test.html'
gour at gaura ~/repos/diff $ darcs record -v
About to get the unrecorded changes.
diffing dir...
I've gotten unrecorded.
addfile ./test.html
Shall I record this patch? (1/2) [ynWsfqdjk?] y
hunk ./test.html 1
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+<head>
+  <title>test</title>
+  <meta name="GENERATOR" content="Quanta Plus">
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+<body>
+This is a test.
+</body>
+</html>
Shall I record this patch? (2/2) [ynWsfqdjk?] y
What is the patch name? patch1
Do you want to add a long comment? [yn] n
About to slurp once.
About to slurp again.
I've applied to slurpy.
Writing the patch file...
Applying to current...
Finished recording patch 'patch1'

Now I did a global search & replace in a Quanta, by replacing the string:
"This is a test" with "This is a TEST."

Here I found a bug in Quanta, i.e. dialog editor shows that it replaced the 
original file test.html & the one in ../_darcs/current!!

The truth is that in the working directory, Quanta created test.html.old which
is the same as test.html???

However, in the ../_darcs/current, there are also test.html & test.html.old
which are different!!!

Now, 

 $ gour at gaura ~/repos/diff $ darcs whatsnew -v
diffing dir...
{
hunk ./test.html 5
-  <title>TEST</title>
+  <title>test</title>
hunk ./test.html 10
-This is a TEST.
+This is a test.
}

shows the difference, but there are no differences in a working directory!!!

gour at gaura ~/repos/diff $ darcs record -v -a
About to get the unrecorded changes.
diffing dir...
I've gotten unrecorded.
What is the patch name? patch2
Do you want to add a long comment? [yn] n
About to slurp once.
About to slurp again.
I've applied to slurpy.
Writing the patch file...
Applying to current...
Finished recording patch 'patch2'

and after that:

gour at gaura ~/repos/diff $ darcs check
Unapplicable patch:
Mon Sep 13 22:20:17 CEST 2004  gour at mail.inet.hr
  * patch2

  darcs failed:  Unapplicable patch!



I hope it helps.


Sincerely,
Gour

-- 
Gour			| gour at mail.inet.hr
Registered Linux User	| #278493
GPG Public Key		| 8C44EDCD
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20040913/9c3fbd66/attachment.pgp 


More information about the darcs-users mailing list