[PATCH 02 of 12] mdiff: move re-exports to top
Yuya Nishihara
yuya at tcha.org
Sat May 6 21:45:43 EDT 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1493712322 -32400
# Tue May 02 17:05:22 2017 +0900
# Node ID 9151ab042bb7e3001d0a2a4fdb8f435928504d36
# Parent ce67363f32a3b8d1ade7be8f18a18a87aa267d03
mdiff: move re-exports to top
This style seems more common in our codebase.
diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
--- a/mercurial/mdiff.py
+++ b/mercurial/mdiff.py
@@ -21,6 +21,10 @@ from . import (
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 trivialdiffheader(length):
def replacediffheader(oldlen, newlen):
return struct.pack(">lll", 0, oldlen, newlen)
-
-patches = mpatch.patches
-patchedsize = mpatch.patchedsize
-textdiff = bdiff.bdiff
More information about the Mercurial-devel
mailing list