hgext/convert/hg.py
changeset 11134 33010ff1fd6f
parent 10939 9f6731b03906
child 11673 a2f11188e2d2
--- a/hgext/convert/hg.py	Sun May 09 21:49:57 2010 +0200
+++ b/hgext/convert/hg.py	Sun May 09 21:52:34 2010 +0200
@@ -134,11 +134,11 @@
         files = dict(files)
         def getfilectx(repo, memctx, f):
             v = files[f]
-            data = source.getfile(f, v)
-            e = source.getmode(f, v)
+            data, mode = source.getfile(f, v)
             if f == '.hgtags':
                 data = self._rewritetags(source, revmap, data)
-            return context.memfilectx(f, data, 'l' in e, 'x' in e, copies.get(f))
+            return context.memfilectx(f, data, 'l' in mode, 'x' in mode,
+                                      copies.get(f))
 
         pl = []
         for p in parents:
@@ -266,13 +266,11 @@
 
     def getfile(self, name, rev):
         try:
-            return self.changectx(rev)[name].data()
+            fctx = self.changectx(rev)[name]
+            return fctx.data(), fctx.flags()
         except error.LookupError, err:
             raise IOError(err)
 
-    def getmode(self, name, rev):
-        return self.changectx(rev).manifest().flags(name)
-
     def getchanges(self, rev):
         ctx = self.changectx(rev)
         parents = self.parents(ctx)