D4540: narrow: don't wrap exchange.pull() during clone
This revision was automatically updated to reflect the committed changes. Closed by commit rHG841c82d1a973: narrow: dont wrap exchange.pull() during clone (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4540?vs=10917=10930 REVISION DETAIL https://phab.mercurial-scm.org/D4540 AFFECTED FILES hgext/narrow/narrowcommands.py CHANGE DETAILS diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py --- a/hgext/narrow/narrowcommands.py +++ b/hgext/narrow/narrowcommands.py @@ -112,16 +112,7 @@ wrappedextraprepare = extensions.wrappedfunction(exchange, '_pullbundle2extraprepare', pullbundle2extraprepare_widen) -def pullnarrow(orig, repo, *args, **kwargs): -if opts['narrow']: -repo.requirements.add(repository.NARROW_REQUIREMENT) -repo._writerequirements() - -return orig(repo, *args, **kwargs) - -wrappedpull = extensions.wrappedfunction(exchange, 'pull', pullnarrow) - -with wrappedextraprepare, wrappedpull: +with wrappedextraprepare: return orig(ui, repo, *args, **pycompat.strkwargs(opts)) def pullnarrowcmd(orig, ui, repo, *args, **opts): To: indygreg, durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D4540: narrow: don't wrap exchange.pull() during clone
indygreg created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The wrapped version was setting up the narrow repo requirement when a narrow clone was requested. Previous commits taught hg.clone() and repo creation to add the narrow requirement when a narrow clone was requested. So this requirement should already be set up for us and this code is no longer necessary. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4540 AFFECTED FILES hgext/narrow/narrowcommands.py CHANGE DETAILS diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py --- a/hgext/narrow/narrowcommands.py +++ b/hgext/narrow/narrowcommands.py @@ -112,16 +112,7 @@ wrappedextraprepare = extensions.wrappedfunction(exchange, '_pullbundle2extraprepare', pullbundle2extraprepare_widen) -def pullnarrow(orig, repo, *args, **kwargs): -if opts['narrow']: -repo.requirements.add(repository.NARROW_REQUIREMENT) -repo._writerequirements() - -return orig(repo, *args, **kwargs) - -wrappedpull = extensions.wrappedfunction(exchange, 'pull', pullnarrow) - -with wrappedextraprepare, wrappedpull: +with wrappedextraprepare: return orig(ui, repo, *args, **pycompat.strkwargs(opts)) def pullnarrowcmd(orig, ui, repo, *args, **opts): To: indygreg, durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel