changeset 1379:8ee7ce877be2

Clean up mdiff imports
author Matt Mackall <mpm@selenic.com>
date Tue, 04 Oct 2005 11:25:48 -0700
parents a0fcfbbf52bb
children 27add82ad845
files mercurial/mdiff.py
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/mdiff.py	Tue Oct 04 11:21:48 2005 -0700
+++ b/mercurial/mdiff.py	Tue Oct 04 11:25:48 2005 -0700
@@ -5,16 +5,14 @@
 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
 
-import difflib, struct, bdiff
-from mpatch import *
-from util import *
+import difflib, struct, bdiff, util, mpatch
 
 def unidiff(a, ad, b, bd, fn, r=None, text=False):
 
     if not a and not b: return ""
-    epoch = datestr((0,0))
+    epoch = util.datestr((0, 0))
 
-    if not text and (binary(a) or binary(b)):
+    if not text and (util.binary(a) or util.binary(b)):
         l = ['Binary file %s has changed\n' % fn]
     elif a == None:
         b = b.splitlines(1)
@@ -117,8 +115,9 @@
     return "".join(t)
 
 def patch(a, bin):
-    return patches(a, [bin])
+    return mpatch.patches(a, [bin])
 
+patches = mpatch.patches
 textdiff = bdiff.bdiff