Mercurial > hg
comparison mercurial/hgweb/hgweb_mod.py @ 2888:3848488244fc
Move ui.diffopts to patch.diffopts where it belongs
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 15 Aug 2006 11:34:08 -0500 |
parents | cf86bbb8ed68 |
children | ef8ee4477019 ee6ed2b29e1a |
comparison
equal
deleted
inserted
replaced
2887:05257fd28591 | 2888:3848488244fc |
---|---|
9 import os | 9 import os |
10 import os.path | 10 import os.path |
11 import mimetypes | 11 import mimetypes |
12 from mercurial.demandload import demandload | 12 from mercurial.demandload import demandload |
13 demandload(globals(), "re zlib ConfigParser mimetools cStringIO sys tempfile") | 13 demandload(globals(), "re zlib ConfigParser mimetools cStringIO sys tempfile") |
14 demandload(globals(), "mercurial:mdiff,ui,hg,util,archival,streamclone") | 14 demandload(globals(), "mercurial:mdiff,ui,hg,util,archival,streamclone,patch") |
15 demandload(globals(), "mercurial:templater") | 15 demandload(globals(), "mercurial:templater") |
16 demandload(globals(), "mercurial.hgweb.common:get_mtime,staticfile") | 16 demandload(globals(), "mercurial.hgweb.common:get_mtime,staticfile") |
17 from mercurial.node import * | 17 from mercurial.node import * |
18 from mercurial.i18n import gettext as _ | 18 from mercurial.i18n import gettext as _ |
19 | 19 |
132 modified, added, removed, deleted, unknown = r.status(node1, node2)[:5] | 132 modified, added, removed, deleted, unknown = r.status(node1, node2)[:5] |
133 if files: | 133 if files: |
134 modified, added, removed = map(lambda x: filterfiles(files, x), | 134 modified, added, removed = map(lambda x: filterfiles(files, x), |
135 (modified, added, removed)) | 135 (modified, added, removed)) |
136 | 136 |
137 diffopts = ui.diffopts() | 137 diffopts = patch.diffopts(ui) |
138 for f in modified: | 138 for f in modified: |
139 to = r.file(f).read(mmap1[f]) | 139 to = r.file(f).read(mmap1[f]) |
140 tn = r.file(f).read(mmap2[f]) | 140 tn = r.file(f).read(mmap2[f]) |
141 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f, | 141 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f, |
142 opts=diffopts), f, tn) | 142 opts=diffopts), f, tn) |