diff -r d7b6aab612b4 -r 33010ff1fd6f hgext/convert/darcs.py --- a/hgext/convert/darcs.py Sun May 09 21:49:57 2010 +0200 +++ b/hgext/convert/darcs.py Sun May 09 21:52:34 2010 +0200 @@ -157,11 +157,11 @@ def getfile(self, name, rev): if rev != self.lastrev: raise util.Abort(_('internal calling inconsistency')) - return open(os.path.join(self.tmppath, name), 'rb').read() - - def getmode(self, name, rev): - mode = os.lstat(os.path.join(self.tmppath, name)).st_mode - return (mode & 0111) and 'x' or '' + path = os.path.join(self.tmppath, name) + data = open(path, 'rb').read() + mode = os.lstat(path).st_mode + mode = (mode & 0111) and 'x' or '' + return data, mode def gettags(self): return self.tags