comparison mercurial/hgweb.py @ 1618:ff339dd21976

Renamed c, a, d, u to modified, added, removed, unknown for users of changes()
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 12 Jan 2006 13:35:09 +0100
parents ba625c8083d8
children 1ba0d7041ac4
comparison
equal deleted inserted replaced
1617:ece5d785e87a 1618:ff339dd21976
263 mmap1 = mf.read(change1[0]) 263 mmap1 = mf.read(change1[0])
264 mmap2 = mf.read(change2[0]) 264 mmap2 = mf.read(change2[0])
265 date1 = util.datestr(change1[2]) 265 date1 = util.datestr(change1[2])
266 date2 = util.datestr(change2[2]) 266 date2 = util.datestr(change2[2])
267 267
268 c, a, d, u = r.changes(node1, node2) 268 modified, added, removed, unknown = r.changes(node1, node2)
269 if files: 269 if files:
270 c, a, d = map(lambda x: filterfiles(x, files), (c, a, d)) 270 modified, added, removed = map(lambda x: filterfiles(x, files),
271 271 (modified, added, removed))
272 for f in c: 272
273 for f in modified:
273 to = r.file(f).read(mmap1[f]) 274 to = r.file(f).read(mmap1[f])
274 tn = r.file(f).read(mmap2[f]) 275 tn = r.file(f).read(mmap2[f])
275 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f), f, tn) 276 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f), f, tn)
276 for f in a: 277 for f in added:
277 to = None 278 to = None
278 tn = r.file(f).read(mmap2[f]) 279 tn = r.file(f).read(mmap2[f])
279 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f), f, tn) 280 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f), f, tn)
280 for f in d: 281 for f in removed:
281 to = r.file(f).read(mmap1[f]) 282 to = r.file(f).read(mmap1[f])
282 tn = None 283 tn = None
283 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f), f, tn) 284 yield diffblock(mdiff.unidiff(to, date1, tn, date2, f), f, tn)
284 285
285 def changelog(self, pos): 286 def changelog(self, pos):