def file(self, f):
        if not self.bundlefilespos:
            self.bundlefile.seek(self.filestart)
            while 1:
                chunk = changegroup.getchunk(self.bundlefile)
                if not chunk:
                    break
                self.bundlefilespos[chunk] = self.bundlefile.tell()
                for c in changegroup.chunkiter(self.bundlefile):
                    pass

        if f[0] == '/':
            f = f[1:]
        if f in self.bundlefilespos:
            self.bundlefile.seek(self.bundlefilespos[f])
            return bundlefilelog(self.sopener, f, self.bundlefile,
                                 self.changelog.rev)
        else:
            return filelog.filelog(self.sopener, f)
Esempio n. 2
0
    def file(self, f):
        if not self.bundlefilespos:
            self.bundle.seek(self.filestart)
            while True:
                chunkdata = self.bundle.filelogheader()
                if not chunkdata:
                    break
                fname = chunkdata['filename']
                self.bundlefilespos[fname] = self.bundle.tell()
                while True:
                    c = self.bundle.deltachunk(None)
                    if not c:
                        break

        if f in self.bundlefilespos:
            self.bundle.seek(self.bundlefilespos[f])
            return bundlefilelog(self.svfs, f, self.bundle, self.changelog.rev)
        else:
            return filelog.filelog(self.svfs, f)
Esempio n. 3
0
    def file(self, f):
        if not self.bundlefilespos:
            self.bundlefile.seek(self.filestart)
            while 1:
                chunk = changegroup.getchunk(self.bundlefile)
                if not chunk:
                    break
                self.bundlefilespos[chunk] = self.bundlefile.tell()
                for c in changegroup.chunkiter(self.bundlefile):
                    pass

        if f[0] == '/':
            f = f[1:]
        if f in self.bundlefilespos:
            self.bundlefile.seek(self.bundlefilespos[f])
            return bundlefilelog(self.sopener, f, self.bundlefile,
                                 self.changelog.rev)
        else:
            return filelog.filelog(self.sopener, f)
Esempio n. 4
0
    def file(self, f):
        if not self.bundlefilespos:
            self.bundle.seek(self.filestart)
            while True:
                chunkdata = self.bundle.filelogheader()
                if not chunkdata:
                    break
                fname = chunkdata['filename']
                self.bundlefilespos[fname] = self.bundle.tell()
                while True:
                    c = self.bundle.deltachunk(None)
                    if not c:
                        break

        if f in self.bundlefilespos:
            self.bundle.seek(self.bundlefilespos[f])
            return bundlefilelog(self.svfs, f, self.bundle, self.changelog.rev)
        else:
            return filelog.filelog(self.svfs, f)
Esempio n. 5
0
    def file(self, f):
        if not self.bundlefilespos:
            self.bundle.seek(self.filestart)
            while 1:
                chunk = self.bundle.chunk()
                if not chunk:
                    break
                self.bundlefilespos[chunk] = self.bundle.tell()
                while 1:
                    c = self.bundle.chunk()
                    if not c:
                        break

        if f[0] == '/':
            f = f[1:]
        if f in self.bundlefilespos:
            self.bundle.seek(self.bundlefilespos[f])
            return bundlefilelog(self.sopener, f, self.bundle,
                                 self.changelog.rev)
        else:
            return filelog.filelog(self.sopener, f)
Esempio n. 6
0
    def file(self, f):
        if not self.bundlefilespos:
            self.bundle.seek(self.filestart)
            while 1:
                chunk = self.bundle.chunk()
                if not chunk:
                    break
                self.bundlefilespos[chunk] = self.bundle.tell()
                while 1:
                    c = self.bundle.chunk()
                    if not c:
                        break

        if f[0] == '/':
            f = f[1:]
        if f in self.bundlefilespos:
            self.bundle.seek(self.bundlefilespos[f])
            return bundlefilelog(self.sopener, f, self.bundle,
                                 self.changelog.rev)
        else:
            return filelog.filelog(self.sopener, f)
Esempio n. 7
0
 def __init__(self, opener, path, opener2, linkmapper, repo):
     filelog.filelog.__init__(self, opener, path)
     filelog2 = filelog.filelog(opener2, path)
     unionrevlog.__init__(self, opener, self.indexfile, filelog2,
                          linkmapper)
     self._repo = repo
Esempio n. 8
0
 def __init__(self, opener, path, opener2, linkmapper, repo):
     filelog.filelog.__init__(self, opener, path)
     filelog2 = filelog.filelog(opener2, path)
     unionrevlog.__init__(self, opener, self.indexfile, filelog2,
                          linkmapper)
     self._repo = repo