##// END OF EJS Templates
hg: write narrow patterns after repo creation...
Gregory Szorc -
r39591:cb675e95 default
parent child Browse files
Show More
@@ -92,19 +92,6 b' def clonenarrowcmd(orig, ui, repo, *args'
92
92
93 if opts['narrow']:
93 if opts['narrow']:
94 def pullbundle2extraprepare_widen(orig, pullop, kwargs):
94 def pullbundle2extraprepare_widen(orig, pullop, kwargs):
95 # Create narrow spec patterns from clone flags
96 includepats = narrowspec.parsepatterns(opts['include'])
97 excludepats = narrowspec.parsepatterns(opts['exclude'])
98
99 if not includepats and excludepats:
100 # If nothing was included, we assume the user meant to include
101 # everything, except what they asked to exclude.
102 includepats = {'path:.'}
103
104 pullop.repo.setnarrowpats(includepats, excludepats)
105
106 # This will populate 'includepats' etc with the values from the
107 # narrowspec we just saved.
108 orig(pullop, kwargs)
95 orig(pullop, kwargs)
109
96
110 if opts.get('depth'):
97 if opts.get('depth'):
@@ -737,6 +737,10 b' def clone(ui, peeropts, source, dest=Non'
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')
General Comments 0
You need to be logged in to leave comments. Login now