Improving Windows support

Andrei Vermel avermel at mail.ru
Tue Apr 17 03:19:17 CDT 2007


----- Original Message ----- 
From: Mark
To: Patrick Mézard
Cc: mercurial at selenic.com
Sent: Tuesday, April 17, 2007 2:11 AM
Subject: Re: Improving Windows support

> Gnuwin32 patch for patches (with mq). But there are many issues with
> this one related to CR-LF and encoding-filters.

.. and also this patch for transplant:

# HG changeset patch
# User Andrei Vermel <avermel at mail.ru>
# Date 1176749952 -14400
# Node ID 6b5118c23a3cd798c49f49032b840c6ce50686c0
# Parent  344e0273ad2a93e6958fa580bf4f0d34b09806d4
Make transplant work on windows

diff -r 344e0273ad2a -r 6b5118c23a3c hgext/transplant.py
--- a/hgext/transplant.py  Mon Apr 16 22:59:12 2007 +0400
+++ b/hgext/transplant.py  Mon Apr 16 22:59:12 2007 +0400
@@ -139,7 +139,7 @@ class transplanter:
                     patchfile = None
                 else:
                     fd, patchfile = 
tempfile.mkstemp(prefix='hg-transplant-')
-                    fp = os.fdopen(fd, 'w')
+                    fp = os.fdopen(fd, 'wb')
                     patch.diff(source, parents[0], node, fp=fp, 
opts=diffopts)
                     fp.close()

@@ -182,8 +182,8 @@ class transplanter:
         fp.close()

         try:
-            util.system('%s %s %s' % (filter, util.shellquote(headerfile),
-                                   util.shellquote(patchfile)),
+            util.system(('%s %s %s' % (filter, util.shellquote(headerfile),
+ 
util.shellquote(patchfile))).replace("\\", "/"),
                         environ={'HGUSER': changelog[1]},
                         onerr=util.Abort, errprefix=_('filter failed'))
             user, date, msg = self.parselog(file(headerfile))[1:4]





More information about the Mercurial mailing list