[RFC] internal patch implementation
Chris Mason
chris.mason at oracle.com
Thu Jan 18 06:21:34 CST 2007
On Thu, Jan 18, 2007 at 01:49:15PM +0900, Shun-ichi GOTO wrote:
> 2007/1/17, Shun-ichi GOTO <shunichi.goto at gmail.com>:
> >I'm playing your branch on windows and I found two defects:
>
> And one more thing on windows.
>
> Python on windows has bug that fp.tell() sometime returns
> strange minus value if filelike object is opened in text mode.
> So the patch operation cause strange error like "[Error 23]"
> which is caused by fp.seek() in scangitpatch().
>
> This is known issue and only for windows platform.
> This issue is described in recent python document (after 2.4.3 or later?)
> See note in description of tell() in this page:
> http://docs.python.org/lib/bltin-file-objects.html
>
> For workaround, patch file should be opened as binary mode to use
> fp.seek() correctly. Here is a patch for that but it would not be
> enough for patch files with CRLF.
> At least, I'm ok to use mq with this patch.
There's already special case code to read the patch into a tellable
object, it would be better to force than than mess up our crlf usage.
-chris
More information about the Mercurial-devel
mailing list