--- a/hgext/extdiff.py Thu Jun 26 13:58:24 2008 -0500
+++ b/hgext/extdiff.py Thu Jun 26 14:35:46 2008 -0500
@@ -52,7 +52,6 @@
def snapshot_node(ui, repo, files, node, tmproot):
'''snapshot files as of some revision'''
- mf = repo.changectx(node).manifest()
dirname = os.path.basename(repo.root)
if dirname == "":
dirname = "root"
@@ -61,17 +60,18 @@
os.mkdir(base)
ui.note(_('making snapshot of %d files from rev %s\n') %
(len(files), short(node)))
+ ctx = repo[node]
for fn in files:
- if not fn in mf:
+ wfn = util.pconvert(fn)
+ if not wfn in ctx:
# skipping new file after a merge ?
continue
- wfn = util.pconvert(fn)
ui.note(' %s\n' % wfn)
dest = os.path.join(base, wfn)
destdir = os.path.dirname(dest)
if not os.path.isdir(destdir):
os.makedirs(destdir)
- data = repo.wwritedata(wfn, repo.file(wfn).read(mf[wfn]))
+ data = repo.wwritedata(wfn, ctx[wfn].data())
open(dest, 'wb').write(data)
return dirname