archival.py: use contexts
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 26 Dec 2006 00:40:28 +0100
changeset 3968 033082ba1d1a
parent 3967 dccb83241dd0
child 3969 edaf68032a27
archival.py: use contexts
mercurial/archival.py
--- a/mercurial/archival.py	Mon Dec 25 17:43:49 2006 +0100
+++ b/mercurial/archival.py	Tue Dec 26 00:40:28 2006 +0100
@@ -159,10 +159,9 @@
             data = fp.getvalue()
         archiver.addfile(name, mode, data)
 
-    change = repo.changelog.read(node)
-    mn = change[0]
-    archiver = archivers[kind](dest, prefix, mtime or change[2][0])
-    m = repo.manifest.read(mn)
+    ctx = repo.changectx(node)
+    archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0])
+    m = ctx.manifest()
     items = m.items()
     items.sort()
     write('.hg_archival.txt', 0644,