D7095: widening: remove pointless code for second changegroup
Closed by commit rHG093dc11d8f8c: widening: remove pointless code for second changegroup (authored by martinvonz). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7095?vs=17149=17213 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7095/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7095 AFFECTED FILES hgext/narrow/narrowbundle2.py CHANGE DETAILS diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -186,28 +186,6 @@ if b'treemanifest' in repo.requirements: part.addparam(b'treemanifest', b'1') -visitnodes, relevant_nodes, ellipsisroots = exchange._computeellipsis( -repo, common, heads, set(), newmatch, depth=depth -) - -repo.ui.debug(b'Found %d relevant revs\n' % len(relevant_nodes)) -if visitnodes: -packer = changegroup.getbundler( -version, -repo, -matcher=newmatch, -ellipses=True, -shallow=depth is not None, -ellipsisroots=ellipsisroots, -fullnodes=relevant_nodes, -) -cgdata = packer.generate(common, visitnodes, False, b'narrow_widen') - -part = bundler.newpart(b'changegroup', data=cgdata) -part.addparam(b'version', version) -if b'treemanifest' in repo.requirements: -part.addparam(b'treemanifest', b'1') - @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE)) def _handlechangespec_2(op, inpart): To: martinvonz, durin42, #hg-reviewers, pulkit Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D7095: widening: remove pointless code for second changegroup
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The caller passes in common==heads, so we will never find any nodes to visit in this code and there will therefore never be a second changegroup emitted. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7095 AFFECTED FILES hgext/narrow/narrowbundle2.py CHANGE DETAILS diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -186,28 +186,6 @@ if b'treemanifest' in repo.requirements: part.addparam(b'treemanifest', b'1') -visitnodes, relevant_nodes, ellipsisroots = exchange._computeellipsis( -repo, common, heads, set(), newmatch, depth=depth -) - -repo.ui.debug(b'Found %d relevant revs\n' % len(relevant_nodes)) -if visitnodes: -packer = changegroup.getbundler( -version, -repo, -matcher=newmatch, -ellipses=True, -shallow=depth is not None, -ellipsisroots=ellipsisroots, -fullnodes=relevant_nodes, -) -cgdata = packer.generate(common, visitnodes, False, b'narrow_widen') - -part = bundler.newpart(b'changegroup', data=cgdata) -part.addparam(b'version', version) -if b'treemanifest' in repo.requirements: -part.addparam(b'treemanifest', b'1') - @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE)) def _handlechangespec_2(op, inpart): To: martinvonz, durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel