Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/commands.py @ 1637:3b1b44b917f4
Add new bdiff based unidiff generation.
author | mason@suse.com |
---|---|
date | Tue, 24 Jan 2006 15:02:10 +1300 |
parents | f49f602fae92 |
children | 80640ef93aec |
comparison
equal
deleted
inserted
replaced
1636:7da32bb3d1d3 | 1637:3b1b44b917f4 |
---|---|
293 | 293 |
294 change = repo.changelog.read(node1) | 294 change = repo.changelog.read(node1) |
295 mmap = repo.manifest.read(change[0]) | 295 mmap = repo.manifest.read(change[0]) |
296 date1 = util.datestr(change[2]) | 296 date1 = util.datestr(change[2]) |
297 | 297 |
298 diffopts = ui.diffopts() | |
299 showfunc = diffopts['showfunc'] | |
300 ignorews = diffopts['ignorews'] | |
298 for f in modified: | 301 for f in modified: |
299 to = None | 302 to = None |
300 if f in mmap: | 303 if f in mmap: |
301 to = repo.file(f).read(mmap[f]) | 304 to = repo.file(f).read(mmap[f]) |
302 tn = read(f) | 305 tn = read(f) |
303 fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text)) | 306 fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text, |
307 showfunc=showfunc, ignorews=ignorews)) | |
304 for f in added: | 308 for f in added: |
305 to = None | 309 to = None |
306 tn = read(f) | 310 tn = read(f) |
307 fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text)) | 311 fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text, |
312 showfunc=showfunc, ignorews=ignorews)) | |
308 for f in removed: | 313 for f in removed: |
309 to = repo.file(f).read(mmap[f]) | 314 to = repo.file(f).read(mmap[f]) |
310 tn = None | 315 tn = None |
311 fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text)) | 316 fp.write(mdiff.unidiff(to, date1, tn, date2, f, r, text=text, |
317 showfunc=showfunc, ignorews=ignorews)) | |
312 | 318 |
313 def trimuser(ui, name, rev, revcache): | 319 def trimuser(ui, name, rev, revcache): |
314 """trim the name of the user who committed a change""" | 320 """trim the name of the user who committed a change""" |
315 user = revcache.get(rev) | 321 user = revcache.get(rev) |
316 if user is None: | 322 if user is None: |