mercurial/revlogutils/deltas.py
changeset 39487 931386a0b108
parent 39337 37957e07138c
child 39488 d629b6d2f05a
equal deleted inserted replaced
39486:43d92d68ac88 39487:931386a0b108
   619     """
   619     """
   620     gdelta = revlog._generaldelta
   620     gdelta = revlog._generaldelta
   621     curr = len(revlog)
   621     curr = len(revlog)
   622     prev = curr - 1
   622     prev = curr - 1
   623 
   623 
   624     # should we try to build a delta?
       
   625     if prev != nullrev and revlog._storedeltachains:
       
   626         tested = set()
       
   627         # This condition is true most of the time when processing
       
   628         # changegroup data into a generaldelta repo. The only time it
       
   629         # isn't true is if this is the first revision in a delta chain
       
   630         # or if ``format.generaldelta=true`` disabled ``lazydeltabase``.
       
   631         if cachedelta and gdelta and revlog._lazydeltabase:
       
   632             # Assume what we received from the server is a good choice
       
   633             # build delta will reuse the cache
       
   634             yield (cachedelta[0],)
       
   635             tested.add(cachedelta[0])
       
   636 
       
   637     # This condition is true most of the time when processing
   624     # This condition is true most of the time when processing
   638     # changegroup data into a generaldelta repo. The only time it
   625     # changegroup data into a generaldelta repo. The only time it
   639     # isn't true is if this is the first revision in a delta chain
   626     # isn't true is if this is the first revision in a delta chain
   640     # or if ``format.generaldelta=true`` disabled ``lazydeltabase``.
   627     # or if ``format.generaldelta=true`` disabled ``lazydeltabase``.
   641     if cachedelta and gdelta and revlog._lazydeltabase:
   628     if cachedelta and gdelta and revlog._lazydeltabase: