equal
deleted
inserted
replaced
218 repo.__class__ = lfsrepo |
218 repo.__class__ = lfsrepo |
219 |
219 |
220 if 'lfs' not in repo.requirements: |
220 if 'lfs' not in repo.requirements: |
221 def checkrequireslfs(ui, repo, **kwargs): |
221 def checkrequireslfs(ui, repo, **kwargs): |
222 if 'lfs' not in repo.requirements: |
222 if 'lfs' not in repo.requirements: |
223 last = kwargs.get('node_last') |
223 last = kwargs.get(r'node_last') |
224 _bin = node.bin |
224 _bin = node.bin |
225 if last: |
225 if last: |
226 s = repo.set('%n:%n', _bin(kwargs['node']), _bin(last)) |
226 s = repo.set('%n:%n', _bin(kwargs[r'node']), _bin(last)) |
227 else: |
227 else: |
228 s = repo.set('%n', _bin(kwargs['node'])) |
228 s = repo.set('%n', _bin(kwargs[r'node'])) |
229 for ctx in s: |
229 for ctx in s: |
230 # TODO: is there a way to just walk the files in the commit? |
230 # 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): |
231 if any(ctx[f].islfs() for f in ctx.files() if f in ctx): |
232 repo.requirements.add('lfs') |
232 repo.requirements.add('lfs') |
233 repo._writerequirements() |
233 repo._writerequirements() |