Mercurial > hg > graal-jvmci-8
changeset 14627:46c020971d9c
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 20 Mar 2014 00:16:39 +0100 |
parents | 4f8268dee8aa (diff) 3ab42370f636 (current diff) |
children | a08b8694f556 |
files | |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mxtool/mx.py Wed Mar 19 23:41:51 2014 +0100 +++ b/mxtool/mx.py Thu Mar 20 00:16:39 2014 +0100 @@ -40,6 +40,7 @@ import xml.parsers.expat import shutil, re, xml.dom.minidom import pipes +import difflib from collections import Callable from threading import Thread from argparse import ArgumentParser, REMAINDER @@ -1930,6 +1931,7 @@ with open(self.path) as fp: content = fp.read() if self.content != content: + self.diff = difflib.unified_diff(self.content.splitlines(1), content.splitlines(1)) self.content = content return True os.utime(self.path, self.times) @@ -1967,6 +1969,7 @@ modified.append(fi) log('{0} files were modified'.format(len(modified))) + if len(modified) != 0: arcbase = _primary_suite.dir if args.backup: @@ -1975,6 +1978,8 @@ for fi in modified: name = os.path.relpath(fi.path, arcbase) log(' - {0}'.format(name)) + log('Changes:') + log(''.join(fi.diff)) if args.backup: arcname = name.replace(os.sep, '/') zf.writestr(arcname, fi.content)