Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 39555:cb675e95a2c2
hg: write narrow patterns after repo creation
Now that hg.clone() knows when a narrow clone is requested, it
makes sense to have it update the narrow patterns for the repo
soon after the repo is created, before any exchange occurs.
Previously, the narrow extension was monkeypatching an exchange
function to do this. The old code is redundant and has been
removed.
Differential Revision: https://phab.mercurial-scm.org/D4541
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 11 Sep 2018 17:22:15 -0700 |
parents | 130e5df346d5 |
children | c5e6c1ba1c79 |
comparison
equal
deleted
inserted
replaced
39554:841c82d1a973 | 39555:cb675e95a2c2 |
---|---|
735 checkout = revs[0] | 735 checkout = revs[0] |
736 else: | 736 else: |
737 revs = None | 737 revs = None |
738 local = destpeer.local() | 738 local = destpeer.local() |
739 if local: | 739 if local: |
740 if narrow: | |
741 with local.lock(): | |
742 local.setnarrowpats(storeincludepats, storeexcludepats) | |
743 | |
740 u = util.url(abspath) | 744 u = util.url(abspath) |
741 defaulturl = bytes(u) | 745 defaulturl = bytes(u) |
742 local.ui.setconfig('paths', 'default', defaulturl, 'clone') | 746 local.ui.setconfig('paths', 'default', defaulturl, 'clone') |
743 if not stream: | 747 if not stream: |
744 if pull: | 748 if pull: |