Patchwork [2,of,7] transplant: treat all files as text when applying a changeset

login
register
mail settings
Submitter Alexander Fomin
Date March 21, 2017, 5:08 p.m.
Message ID <6e4849bc2c126815e8ed.1490116115@devvm2125.lla2.facebook.com>
Download mbox | patch
Permalink /patch/19531/
State Changes Requested
Headers show

Comments

Alexander Fomin - March 21, 2017, 5:08 p.m.
# HG changeset patch
# User Alexander Fomin <afomin@fb.com>
# Date 1490051515 25200
#      Mon Mar 20 16:11:55 2017 -0700
# Node ID 6e4849bc2c126815e8edfe176257883907596361
# Parent  3c43572fec91b9caa83dc3402532046013b84e07
transplant: treat all files as text when applying a changeset

This patch makes transplant treat all files as text when when applying a
changeset. It has no immediate effect, but rather allows to change hg
behaviour with regarding to binary diffs generation in Git mode (issue5510).

Patch

diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -143,6 +143,8 @@  class transplanter(object):
         pulls = []
         diffopts = patch.difffeatureopts(self.ui, opts)
         diffopts.git = True
+        # Enable binary diffs in Git mode
+        diffopts.text = True
 
         lock = tr = None
         try: