diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -17,7 +17,7 @@ import changegroup, util, os, struct, bz import localrepo, changelog, manifest, filelog, revlog class bundlerevlog(revlog.revlog): - def __init__(self, opener, indexfile, datafile, bundlefile, + def __init__(self, opener, indexfile, bundlefile, linkmapper=None): # How it works: # to retrieve a revision, we need to know the offset of @@ -28,7 +28,7 @@ class bundlerevlog(revlog.revlog): # len(index[r]). If the tuple is bigger than 7, it is a bundle # (it is bigger since we store the node to which the delta is) # - revlog.revlog.__init__(self, opener, indexfile, datafile) + revlog.revlog.__init__(self, opener, indexfile) self.bundlefile = bundlefile self.basemap = {} def chunkpositer(): @@ -140,20 +140,19 @@ class bundlerevlog(revlog.revlog): class bundlechangelog(bundlerevlog, changelog.changelog): def __init__(self, opener, bundlefile): changelog.changelog.__init__(self, opener) - bundlerevlog.__init__(self, opener, self.indexfile, self.datafile, - bundlefile) + bundlerevlog.__init__(self, opener, self.indexfile, bundlefile) class bundlemanifest(bundlerevlog, manifest.manifest): def __init__(self, opener, bundlefile, linkmapper): manifest.manifest.__init__(self, opener) - bundlerevlog.__init__(self, opener, self.indexfile, self.datafile, - bundlefile, linkmapper) + bundlerevlog.__init__(self, opener, self.indexfile, bundlefile, + linkmapper) class bundlefilelog(bundlerevlog, filelog.filelog): def __init__(self, opener, path, bundlefile, linkmapper): filelog.filelog.__init__(self, opener, path) - bundlerevlog.__init__(self, opener, self.indexfile, self.datafile, - bundlefile, linkmapper) + bundlerevlog.__init__(self, opener, self.indexfile, bundlefile, + linkmapper) class bundlerepository(localrepo.localrepository): def __init__(self, ui, path, bundlename): diff --git a/mercurial/changelog.py b/mercurial/changelog.py --- a/mercurial/changelog.py +++ b/mercurial/changelog.py @@ -28,8 +28,7 @@ def _string_unescape(text): class changelog(revlog): def __init__(self, opener, defversion=REVLOGV0): - revlog.__init__(self, opener, "00changelog.i", "00changelog.d", - defversion) + revlog.__init__(self, opener, "00changelog.i", defversion) def decode_extra(self, text): extra = {} diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -666,7 +666,7 @@ def copy(ui, repo, *pats, **opts): def debugancestor(ui, index, rev1, rev2): """find the ancestor revision of two revisions in a given index""" - r = revlog.revlog(util.opener(os.getcwd(), audit=False), index, "", 0) + r = revlog.revlog(util.opener(os.getcwd(), audit=False), index, 0) a = r.ancestor(r.lookup(rev1), r.lookup(rev2)) ui.write("%d:%s\n" % (r.rev(a), hex(a))) @@ -796,7 +796,7 @@ def debugstate(ui, repo): def debugdata(ui, file_, rev): """dump the contents of an data file revision""" r = revlog.revlog(util.opener(os.getcwd(), audit=False), - file_[:-2] + ".i", file_, 0) + file_[:-2] + ".i", 0) try: ui.write(r.revision(r.lookup(rev))) except KeyError: @@ -816,7 +816,7 @@ def debugdate(ui, date, range=None, **op def debugindex(ui, file_): """dump the contents of an index file""" - r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0) + r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, 0) ui.write(" rev offset length base linkrev" + " nodeid p1 p2\n") for i in xrange(r.count()): @@ -828,7 +828,7 @@ def debugindex(ui, file_): def debugindexdot(ui, file_): """dump an index DAG as a .dot file""" - r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0) + r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, 0) ui.write("digraph G {\n") for i in xrange(r.count()): node = r.node(i) diff --git a/mercurial/filelog.py b/mercurial/filelog.py --- a/mercurial/filelog.py +++ b/mercurial/filelog.py @@ -12,7 +12,6 @@ class filelog(revlog): def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION): revlog.__init__(self, opener, "/".join(("data", self.encodedir(path + ".i"))), - "/".join(("data", self.encodedir(path + ".d"))), defversion) # This avoids a collision between a file named foo and a dir named diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -38,8 +38,7 @@ class manifest(revlog): def __init__(self, opener, defversion=REVLOGV0): self.mapcache = None self.listcache = None - revlog.__init__(self, opener, "00manifest.i", "00manifest.d", - defversion) + revlog.__init__(self, opener, "00manifest.i", defversion) def parselines(self, lines): for l in lines.splitlines(1): diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -311,8 +311,7 @@ class revlog(object): remove data, and can use some simple techniques to avoid the need for locking while reading. """ - def __init__(self, opener, indexfile, datafile, - defversion=REVLOG_DEFAULT_VERSION): + def __init__(self, opener, indexfile, defversion=REVLOG_DEFAULT_VERSION): """ create a revlog object @@ -320,7 +319,7 @@ class revlog(object): and can be used to implement COW semantics or the like. """ self.indexfile = indexfile - self.datafile = datafile + self.datafile = indexfile[:-2] + ".d" self.opener = opener self.indexstat = None