comparison mercurial/hgweb/hgweb_mod.py @ 2580:a20a1bb0c396

diff: add -b/-B options
author Haakon Riiser <haakon.riiser@fys.uio.no>
date Thu, 29 Jun 2006 15:16:25 +0200
parents 0875cda033fd
children ffb895f16925
comparison
equal deleted inserted replaced
2579:0875cda033fd 2580:a20a1bb0c396
131 (modified, added, removed)) 131 (modified, added, removed))
132 132
133 diffopts = self.repo.ui.diffopts() 133 diffopts = self.repo.ui.diffopts()
134 showfunc = diffopts['showfunc'] 134 showfunc = diffopts['showfunc']
135 ignorews = diffopts['ignorews'] 135 ignorews = diffopts['ignorews']
136 ignorewsamount = diffopts['ignorewsamount']
137 ignoreblanklines = diffopts['ignoreblanklines']
136 for f in modified: 138 for f in modified:
137 to = r.file(f).read(mmap1[f]) 139 to = r.file(f).read(mmap1[f])
138 tn = r.file(f).read(mmap2[f]) 140 tn = r.file(f).read(mmap2[f])
139 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f, 141 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f,
140 showfunc=showfunc, ignorews=ignorews), f, tn) 142 showfunc=showfunc, ignorews=ignorews,
143 ignorewsamount=ignorewsamount,
144 ignoreblanklines=ignoreblanklines), f, tn)
141 for f in added: 145 for f in added:
142 to = None 146 to = None
143 tn = r.file(f).read(mmap2[f]) 147 tn = r.file(f).read(mmap2[f])
144 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f, 148 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f,
145 showfunc=showfunc, ignorews=ignorews), f, tn) 149 showfunc=showfunc, ignorews=ignorews,
150 ignorewsamount=ignorewsamount,
151 ignoreblanklines=ignoreblanklines), f, tn)
146 for f in removed: 152 for f in removed:
147 to = r.file(f).read(mmap1[f]) 153 to = r.file(f).read(mmap1[f])
148 tn = None 154 tn = None
149 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f, 155 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f,
150 showfunc=showfunc, ignorews=ignorews), f, tn) 156 showfunc=showfunc, ignorews=ignorews,
157 ignorewsamount=ignorewsamount,
158 ignoreblanklines=ignoreblanklines), f, tn)
151 159
152 def changelog(self, pos): 160 def changelog(self, pos):
153 def changenav(**map): 161 def changenav(**map):
154 def seq(factor, maxchanges=None): 162 def seq(factor, maxchanges=None):
155 if maxchanges: 163 if maxchanges: