[PATCH 05 of 12] mpatch: proxy through mdiff module

Yuya Nishihara yuya at tcha.org
Sat May 6 21:45:46 EDT 2017


# HG changeset patch
# User Yuya Nishihara <yuya at 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.

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])))


More information about the Mercurial-devel mailing list