##// END OF EJS Templates
narrow: set opts['narrow'] instead of local variable...
Gregory Szorc -
r39582:4afd2af3 default
parent child Browse files
Show More
@@ -66,7 +66,6 b' def clonenarrowcmd(orig, ui, repo, *args'
66 66 """Wraps clone command, so 'hg clone' first wraps localrepo.clone()."""
67 67 opts = pycompat.byteskwargs(opts)
68 68 wrappedextraprepare = util.nullcontextmanager()
69 opts_narrow = opts['narrow']
70 69 narrowspecfile = opts['narrowspec']
71 70
72 71 if narrowspecfile:
@@ -87,11 +86,11 b' def clonenarrowcmd(orig, ui, repo, *args'
87 86 narrowspec.validatepatterns(excludes)
88 87
89 88 # narrowspec is passed so we should assume that user wants narrow clone
90 opts_narrow = True
89 opts['narrow'] = True
91 90 opts['include'].extend(includes)
92 91 opts['exclude'].extend(excludes)
93 92
94 if opts_narrow:
93 if opts['narrow']:
95 94 def pullbundle2extraprepare_widen(orig, pullop, kwargs):
96 95 # Create narrow spec patterns from clone flags
97 96 includepats = narrowspec.parsepatterns(opts['include'])
@@ -114,7 +113,7 b' def clonenarrowcmd(orig, ui, repo, *args'
114 113 '_pullbundle2extraprepare', pullbundle2extraprepare_widen)
115 114
116 115 def pullnarrow(orig, repo, *args, **kwargs):
117 if opts_narrow:
116 if opts['narrow']:
118 117 repo.requirements.add(repository.NARROW_REQUIREMENT)
119 118 repo._writerequirements()
120 119
General Comments 0
You need to be logged in to leave comments. Login now