[darcs-users] Usable diffs?

Lyle Kopnicky lists at qseep.net
Sat Feb 28 06:44:55 UTC 2009


Hi folks,
I wanted to try to patch some files using a darcs diff. Unfortunately, patch
chokes on the input. The darcs command I executed was:

darcs diff -p make-str-function-not-generate-space-after-numbers >
../patch.txt


This is a patch that involved multiple files. The first several lines of the
resulting patch file looked like this:

Fri Feb 13 18:27:37 Pacific Standard Time 2009  lyle at vintage-basic.net
  * make-str-function-not-generate-space-after-numbers
diff -rN old-vintage-basic-copy/doc/Vintage_BASIC_Users_Guide.html
new-vintage-basic-copy/doc/Vintage_BASIC_Users_Guide.html
381c381
< value, as it would be printed by <code>PRINT</code>.</dd>

---
> value, as it would be printed by <code>PRINT</code>, but without the
trailing space.</dd>

diff -rN old-vintage-basic-copy/src/Language/VintageBasic/Interpreter.hs
new-vintage-basic-copy/src/Language/VintageBasic/Interpreter.hs
509c509
< showVal (IntVal iv) = if iv > 0 then " " else "" ++ show iv ++ " "
---
> showVal (IntVal iv) = if iv > 0 then " " else "" ++ show iv


Then I reverted the patch from darcs, and tried to reapply it using the
patch command:

darcs unrecord -a -p make-str-function-not-generate-space-after-numbers
darcs revert -a
patch -p0 < ../patch.txt


Unfortunately the patch wouldn't apply. I go the following output:

(Stripping trailing CRs from patch.)
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Fri Feb 13 18:27:37 Pacific Standard Time 2009  lyle at vintage-basic.net
|  * make-str-function-not-generate-space-after-numbers
|diff -rN old-vintage-basic-copy/doc/Vintage_BASIC_Users_Guide.html
new-vintage-basic-copy/doc/Vintage_BASIC_Users_Guide.html
--------------------------
File to patch:


Why couldn't it figure out which file to patch? Is the darcs diff output in
a nonstandard format? I tried -p1 and -p2 as well, to no avail. The patch
command won't give me any more information about what guesses it made as to
the filenames.

I'm running darcs on Windows Vista, if it helps. It's the Windows native
version of darcs, but the cygwin version of patch.

- Lyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090227/e02b6c26/attachment.htm>


More information about the darcs-users mailing list