1. mirror
  2. mercurial

Commits

Pierre-Yves David  committed 5e851ca

bundlerepo: enforce reading from core repo only

We do not want anything computed with the bundle overlay to be written back in
the repo. Such write will likely contains invalid data.

The short terms goal of this change is to drop use of `_cacheabletip` in bundle
repo.

  • Participants
  • Parent commits cd4c752
  • Branches default

Comments (0)

Files changed (1)

File mercurial/bundlerepo.py

View file
  • Ignore whitespace
 from node import nullid
 from i18n import _
 import os, tempfile, shutil
-import changegroup, util, mdiff, discovery, cmdutil
+import changegroup, util, mdiff, discovery, cmdutil, scmutil
 import localrepo, changelog, manifest, filelog, revlog, error
 
 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)
         #
+        opener = scmutil.readonlyvfs(opener)
         revlog.revlog.__init__(self, opener, indexfile)
         self.bundle = bundle
         self.basemap = {}