pulkit added a comment.

  I agree this is dirty and I will be very happy to improve this. I can think 
of folllowing improvements
  
  First is this:
  
    @@ -837,10 +838,14 @@ class cgpacker(object):
             size = 0
     
             clstate, deltas = self._generatechangelog(cl, clnodes)
    -        for delta in deltas:
    -            for chunk in _revisiondeltatochunks(delta, 
self._builddeltaheader):
    -                size += len(chunk)
    -                yield chunk
    +        if changelog:
    +            for delta in deltas:
    +                for chunk in _revisiondeltatochunks(delta, 
self._builddeltaheader):
    +                    size += len(chunk)
    +                    yield chunk
    +        else:
    +            for delta in deltas:
    +                pass
     
             close = closechunk()
             size += len(close)
  
  The second improvement is to add a part argument instead of changelog where 
by default, part = `('changelog', 'manifests', 'treemanifests', 'filelog')` and 
caller can pass a value of parts. The call in narrow will pass `('manifests', 
'treemanifests', 'filelog')` and in future we can reduce that to 
`('treemanifests', 'filelogs')`.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4638

To: pulkit, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to