transplant: don't honor whitespace and format-changing diffopts
authorSiddharth Agarwal <sid0@fb.com>
Tue, 18 Nov 2014 21:49:05 -0800
changeset 23452 86c0d8c1484f
parent 23451 5fb1fc2e1281
child 23453 341e4798c24d
transplant: don't honor whitespace and format-changing diffopts transplant uses diff purely internally.
hgext/transplant.py
tests/test-transplant.t
--- a/hgext/transplant.py	Tue Nov 18 21:38:19 2014 -0800
+++ b/hgext/transplant.py	Tue Nov 18 21:49:05 2014 -0800
@@ -118,7 +118,7 @@
         revs = sorted(revmap)
         p1, p2 = repo.dirstate.parents()
         pulls = []
-        diffopts = patch.diffopts(self.ui, opts)
+        diffopts = patch.difffeatureopts(self.ui, opts)
         diffopts.git = True
 
         lock = wlock = tr = None
--- a/tests/test-transplant.t	Tue Nov 18 21:38:19 2014 -0800
+++ b/tests/test-transplant.t	Tue Nov 18 21:49:05 2014 -0800
@@ -230,7 +230,8 @@
   (transplanted from e234d668f844e1b1a765f01db83a32c0c7bfa170)
   1  r2
   0  r1
-remote transplant
+remote transplant, and also test that transplant doesn't break with
+format-breaking diffopts
 
   $ hg clone -r 1 ../t ../remote
   adding changesets
@@ -240,7 +241,7 @@
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd ../remote
-  $ hg transplant --log -s ../t 2 4
+  $ hg --config diff.noprefix=True transplant --log -s ../t 2 4
   searching for changes
   applying 37a1297eb21b
   37a1297eb21b transplanted to c19cf0ccb069