##// END OF EJS Templates
revlog: make sure we never use sparserevlog without general delta (issue6056)...
Boris Feld -
r41525:189e06b2 stable
parent child Browse files
Show More
@@ -497,6 +497,9 class revlog(object):
497 497 else:
498 498 raise error.RevlogError(_('unknown version (%d) in revlog %s') %
499 499 (fmt, self.indexfile))
500 # sparse-revlog can't be on without general-delta (issue6056)
501 if not self._generaldelta:
502 self._sparserevlog = False
500 503
501 504 self._storedeltachains = True
502 505
@@ -755,7 +755,8 def _rawgroups(revlog, p1, p2, cachedelt
755 755 The group order aims at providing fast or small candidates first.
756 756 """
757 757 gdelta = revlog._generaldelta
758 sparse = revlog._sparserevlog
758 # gate sparse behind general-delta because of issue6056
759 sparse = gdelta and revlog._sparserevlog
759 760 curr = len(revlog)
760 761 prev = curr - 1
761 762 deltachain = lambda rev: revlog._deltachain(rev)[0]
@@ -268,3 +268,25 clone bookmarks
268 268 exporting bookmark test
269 269 $ hg -R remote-bookmarks bookmarks
270 270 test 0:08b9e9f63b32
271
272 Check format constraint
273 -----------------------
274
275 $ hg init issue6056 --config format.usegeneraldelta=0 --config format.sparse-revlog=0
276 $ cd issue6056
277 $ echo foo > 1
278 $ echo foo > 2
279 $ echo foo > 3
280 $ echo foo > 4
281 $ echo foo > 5
282 $ hg add *
283
284 Build a bogus repository (sparserevlog without general delta)
285
286 $ hg commit -m 'initial changesets'
287 $ echo 'sparserevlog' >> .hg/requires
288 $ for x in `$TESTDIR/seq.py 100`; do
289 > echo $x >> `expr $x % 5 + 1`
290 > hg commit -m $x
291 > done
292 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now