[darcs-users] darcs push problem: cannot find file

Will will at glozer.net
Fri Nov 19 17:41:08 UTC 2004


David Roundy <droundy at abridgegame.org> writes:

> On Fri, Nov 19, 2004 at 12:19:54PM +0100, Daan Leijen wrote:
>> Will wrote:
>> >
>> >I can also duplicate this problem, when I attempt to push a patch that
>> >modifies an existing file I get:
>> >
>> >  darcs failed:  Error applying patch to recorded!
>> >
>> >Strangely this only seems to happen for hunk patches; adding,
>> >removing, and replacing work fine.  Even stranger, it works ok when
>> >darcs is run from msys's sh.exe, but not from cmd.exe.  The only
>> >difference I can see is whether the lines in the file end in "\n" or
>> >"\r\n".
>
> Hmmmm.  Could it be that stdin is being read in text mode? If so, we should
> switch to reading stdin in binary mode.  Can one of the windows developers
> check this?

That did the trick!  I also set stdout to binary mode as the
impossible_unrevert.sh test has been failing with a difference of one
'\r'.

I did an early daily build that includes this patch, would much
appreciate if the other windows users who contributed to this thread
test it:

  http://glozer.net/darcs/daily/

One ramification of this change is that when you enter the patch name
interactively from cmd.exe it seems to contain a '\r', should it be
stripped?

Regards,
Will




More information about the darcs-users mailing list