Mercurial > hg
comparison hgext/extdiff.py @ 3977:95e6488bc809
extdiff: use contexts
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 26 Dec 2006 03:25:44 +0100 |
parents | 6b4127c7d52a |
children | 656e06eebda7 |
comparison
equal
deleted
inserted
replaced
3976:f8849648b0e2 | 3977:95e6488bc809 |
---|---|
54 import os, shutil, tempfile | 54 import os, shutil, tempfile |
55 | 55 |
56 def dodiff(ui, repo, diffcmd, diffopts, pats, opts): | 56 def dodiff(ui, repo, diffcmd, diffopts, pats, opts): |
57 def snapshot_node(files, node): | 57 def snapshot_node(files, node): |
58 '''snapshot files as of some revision''' | 58 '''snapshot files as of some revision''' |
59 changes = repo.changelog.read(node) | 59 mf = repo.changectx(node).manifest() |
60 mf = repo.manifest.read(changes[0]) | |
61 dirname = '%s.%s' % (os.path.basename(repo.root), short(node)) | 60 dirname = '%s.%s' % (os.path.basename(repo.root), short(node)) |
62 base = os.path.join(tmproot, dirname) | 61 base = os.path.join(tmproot, dirname) |
63 os.mkdir(base) | 62 os.mkdir(base) |
64 if not ui.quiet: | 63 if not ui.quiet: |
65 ui.write_err(_('making snapshot of %d files from rev %s\n') % | 64 ui.write_err(_('making snapshot of %d files from rev %s\n') % |