##// END OF EJS Templates
Fix hgk extension due to 4ec58b157265 refactoring
Edouard Gomez -
r3012:abcd6ae3 default
parent child Browse files
Show More
@@ -46,18 +46,20 b' def dodiff(fp, ui, repo, node1, node2, f'
46 if f in mmap:
46 if f in mmap:
47 to = repo.file(f).read(mmap[f])
47 to = repo.file(f).read(mmap[f])
48 tn = read(f)
48 tn = read(f)
49 opts = mdiff.diffopts()
50 opts.text = text
49 fp.write("diff --git a/%s b/%s\n" % (f, f))
51 fp.write("diff --git a/%s b/%s\n" % (f, f))
50 fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, text=text))
52 fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, opts=opts))
51 for f in added:
53 for f in added:
52 to = None
54 to = None
53 tn = read(f)
55 tn = read(f)
54 fp.write("diff --git /dev/null b/%s\n" % (f))
56 fp.write("diff --git /dev/null b/%s\n" % (f))
55 fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, text=text))
57 fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, opts=opts))
56 for f in removed:
58 for f in removed:
57 to = repo.file(f).read(mmap[f])
59 to = repo.file(f).read(mmap[f])
58 tn = None
60 tn = None
59 fp.write("diff --git a/%s /dev/null\n" % (f))
61 fp.write("diff --git a/%s /dev/null\n" % (f))
60 fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, text=text))
62 fp.write(mdiff.unidiff(to, date1, tn, date2, f, None, opts=opts))
61
63
62 def difftree(ui, repo, node1=None, node2=None, **opts):
64 def difftree(ui, repo, node1=None, node2=None, **opts):
63 """diff trees from two commits"""
65 """diff trees from two commits"""
General Comments 0
You need to be logged in to leave comments. Login now