mercurial/revlog.py
changeset 30012 60a66c79125f
parent 30011 d81fe5af92b8
child 30154 5e72129d75ed
equal deleted inserted replaced
30011:d81fe5af92b8 30012:60a66c79125f
  1469             textlen = len(text)
  1469             textlen = len(text)
  1470 
  1470 
  1471         # should we try to build a delta?
  1471         # should we try to build a delta?
  1472         if prev != nullrev:
  1472         if prev != nullrev:
  1473             tested = set()
  1473             tested = set()
       
  1474             # This condition is true most of the time when processing
       
  1475             # changegroup data into a generaldelta repo. The only time it
       
  1476             # isn't true is if this is the first revision in a delta chain
       
  1477             # or if ``format.generaldelta=true`` disabled ``lazydeltabase``.
  1474             if cachedelta and self._generaldelta and self._lazydeltabase:
  1478             if cachedelta and self._generaldelta and self._lazydeltabase:
  1475                 # Assume what we received from the server is a good choice
  1479                 # Assume what we received from the server is a good choice
  1476                 # build delta will reuse the cache
  1480                 # build delta will reuse the cache
  1477                 candidatedelta = builddelta(cachedelta[0])
  1481                 candidatedelta = builddelta(cachedelta[0])
  1478                 tested.add(cachedelta[0])
  1482                 tested.add(cachedelta[0])