# HG changeset patch # User Matt Mackall # Date 1128450348 25200 # Node ID 8ee7ce877be2a4d4e525e7f995d9942920b6a319 # Parent a0fcfbbf52bb411ca0c7c42d0256b12dfbb55432 Clean up mdiff imports diff -r a0fcfbbf52bb -r 8ee7ce877be2 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