[PATCH] Fix transplant to generate diffs in text mode

Patrick Mezard pmezard at gmail.com
Mon Dec 25 12:47:55 CST 2006


# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1167075961 -3600
# Node ID f75741f8c1b230f3e4ba75ae39cb81adf1ddea01
# Parent  2b87d3c5ab8e2ac79479c643c30e3949ca64690e
Fix transplant to generate diffs in text mode.

diff -r 2b87d3c5ab8e -r f75741f8c1b2 hgext/transplant.py
--- a/hgext/transplant.py	Fri Dec 22 17:59:40 2006 -0600
+++ b/hgext/transplant.py	Mon Dec 25 20:46:01 2006 +0100
@@ -137,7 +137,7 @@ class transplanter:
                                  % (rev, revlog.short(node)))
                     patchfile = None
                 else:
-                    fd, patchfile = tempfile.mkstemp(prefix='hg-transplant-')
+                    fd, patchfile = tempfile.mkstemp(prefix='hg-transplant-', text=True)
                     fp = os.fdopen(fd, 'w')
                     patch.diff(source, parents[0], node, fp=fp, opts=diffopts)
                     fp.close()


More information about the Mercurial-devel mailing list