Mercurial > hg
changeset 39554:841c82d1a973
narrow: don't wrap exchange.pull() during clone
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.
Differential Revision: https://phab.mercurial-scm.org/D4540
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 11 Sep 2018 16:59:17 -0700 |
parents | 130e5df346d5 |
children | cb675e95a2c2 |
files | hgext/narrow/narrowcommands.py |
diffstat | 1 files changed, 1 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py Tue Sep 11 17:21:18 2018 -0700 +++ b/hgext/narrow/narrowcommands.py Tue Sep 11 16:59:17 2018 -0700 @@ -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):