Patchwork [05,of,12] mpatch: proxy through mdiff module

login
register
mail settings
Submitter Yuya Nishihara
Date May 7, 2017, 1:45 a.m.
Message ID <3c2b0b5bf7a694cc39e1.1494121546@mimosa>
Download mbox | patch
Permalink /patch/20503/
State Accepted
Headers show

Comments

Yuya Nishihara - May 7, 2017, 1:45 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1493211959 -32400
#      Wed Apr 26 22:05:59 2017 +0900
# Node ID 3c2b0b5bf7a694cc39e1ff320fb764e4f755ed8b
# Parent  76fe2c32aa679ec904f5a367a73520a9fa4431cf
mpatch: proxy through mdiff module

See the previous commit for why.

Patch

diff --git a/contrib/bdiff-torture.py b/contrib/bdiff-torture.py
--- a/contrib/bdiff-torture.py
+++ b/contrib/bdiff-torture.py
@@ -6,7 +6,6 @@  import sys
 
 from mercurial import (
     mdiff,
-    mpatch,
 )
 
 def reducetest(a, b):
@@ -45,7 +44,7 @@  def test1(a, b):
     d = mdiff.textdiff(a, b)
     if not d:
         raise ValueError("empty")
-    c = mpatch.patches(a, [d])
+    c = mdiff.patches(a, [d])
     if c != b:
         raise ValueError("bad")
 
diff --git a/tests/test-bdiff.py b/tests/test-bdiff.py
--- a/tests/test-bdiff.py
+++ b/tests/test-bdiff.py
@@ -5,7 +5,6 @@  import unittest
 
 from mercurial import (
     mdiff,
-    mpatch,
 )
 
 class diffreplace(
@@ -19,7 +18,7 @@  class BdiffTests(unittest.TestCase):
         d = mdiff.textdiff(a, b)
         c = a
         if d:
-            c = mpatch.patches(a, [d])
+            c = mdiff.patches(a, [d])
         self.assertEqual(
             c, b, ("bad diff+patch result from\n  %r to\n  "
                    "%r: \nbdiff: %r\npatched: %r" % (a, b, d, c[:200])))