##// END OF EJS Templates
lfs: respect narrowmatcher when testing to add 'lfs' requirement (issue5794)...
Matt Harbison -
r37156:4d63f3bc default
parent child Browse files
Show More
@@ -226,9 +226,11 b' def reposetup(ui, repo):'
226 226 s = repo.set('%n:%n', _bin(kwargs[r'node']), _bin(last))
227 227 else:
228 228 s = repo.set('%n', _bin(kwargs[r'node']))
229 match = repo.narrowmatch()
229 230 for ctx in s:
230 231 # TODO: is there a way to just walk the files in the commit?
231 if any(ctx[f].islfs() for f in ctx.files() if f in ctx):
232 if any(ctx[f].islfs() for f in ctx.files()
233 if f in ctx and match(f)):
232 234 repo.requirements.add('lfs')
233 235 repo._writerequirements()
234 236 repo.prepushoutgoinghooks.add('lfs', wrapper.prepush)
@@ -28,7 +28,11 b' create full repo'
28 28
29 29 $ cd ..
30 30
31 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
31 (The lfs extension does nothing here, but this test ensures that its hook that
32 determines whether to add the lfs requirement, respects the narrow boundaries.)
33
34 $ hg --config extensions.lfs= clone --narrow ssh://user@dummy/master narrow \
35 > --include inside
32 36 requesting all changes
33 37 adding changesets
34 38 adding manifests
General Comments 0
You need to be logged in to leave comments. Login now