mdiff: move re-exports to top
This style seems more common in our codebase.
--- a/mercurial/mdiff.py Tue May 02 19:10:55 2017 +0900
+++ b/mercurial/mdiff.py Tue May 02 17:05:22 2017 +0900
@@ -21,6 +21,10 @@
util,
)
+patches = mpatch.patches
+patchedsize = mpatch.patchedsize
+textdiff = bdiff.bdiff
+
def splitnewlines(text):
'''like str.splitlines, but only split on newlines.'''
lines = [l + '\n' for l in text.split('\n')]
@@ -478,7 +482,3 @@
def replacediffheader(oldlen, newlen):
return struct.pack(">lll", 0, oldlen, newlen)
-
-patches = mpatch.patches
-patchedsize = mpatch.patchedsize
-textdiff = bdiff.bdiff