equal
deleted
inserted
replaced
158 |
158 |
159 class bundlerepository(localrepo.localrepository): |
159 class bundlerepository(localrepo.localrepository): |
160 def __init__(self, ui, path, bundlename): |
160 def __init__(self, ui, path, bundlename): |
161 localrepo.localrepository.__init__(self, ui, path) |
161 localrepo.localrepository.__init__(self, ui, path) |
162 f = open(bundlename, "rb") |
162 f = open(bundlename, "rb") |
163 s = os.fstat(f.fileno()) |
163 s = util.fstat(f) |
164 self.bundlefile = f |
164 self.bundlefile = f |
165 header = self.bundlefile.read(6) |
165 header = self.bundlefile.read(6) |
166 if not header.startswith("HG"): |
166 if not header.startswith("HG"): |
167 raise util.Abort(_("%s: not a Mercurial bundle file") % bundlename) |
167 raise util.Abort(_("%s: not a Mercurial bundle file") % bundlename) |
168 elif not header.startswith("HG10"): |
168 elif not header.startswith("HG10"): |