Clean up mdiff imports
authorMatt Mackall <mpm@selenic.com>
Tue, 04 Oct 2005 11:25:48 -0700
changeset 1379 8ee7ce877be2
parent 1378 a0fcfbbf52bb
child 1380 27add82ad845
Clean up mdiff imports
mercurial/mdiff.py
--- 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