Mercurial > hg
comparison hgext/lfs/__init__.py @ 40313:ef0baff11aea
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 16 Oct 2018 08:16:11 -0400 |
parents | 9c4cbbb0fc51 535fc8a22365 |
children | 84d61fdcefa5 |
comparison
equal
deleted
inserted
replaced
40312:5644f7c8982e | 40313:ef0baff11aea |
---|---|
235 | 235 |
236 repo.__class__ = lfsrepo | 236 repo.__class__ = lfsrepo |
237 | 237 |
238 if 'lfs' not in repo.requirements: | 238 if 'lfs' not in repo.requirements: |
239 def checkrequireslfs(ui, repo, **kwargs): | 239 def checkrequireslfs(ui, repo, **kwargs): |
240 if 'lfs' not in repo.requirements: | 240 if 'lfs' in repo.requirements: |
241 last = kwargs.get(r'node_last') | 241 return 0 |
242 _bin = node.bin | 242 |
243 if last: | 243 last = kwargs.get(r'node_last') |
244 s = repo.set('%n:%n', _bin(kwargs[r'node']), _bin(last)) | 244 _bin = node.bin |
245 else: | 245 if last: |
246 s = repo.set('%n', _bin(kwargs[r'node'])) | 246 s = repo.set('%n:%n', _bin(kwargs[r'node']), _bin(last)) |
247 else: | |
248 s = repo.set('%n', _bin(kwargs[r'node'])) | |
247 match = repo.narrowmatch() | 249 match = repo.narrowmatch() |
248 for ctx in s: | 250 for ctx in s: |
249 # TODO: is there a way to just walk the files in the commit? | 251 # TODO: is there a way to just walk the files in the commit? |
250 if any(ctx[f].islfs() for f in ctx.files() | 252 if any(ctx[f].islfs() for f in ctx.files() |
251 if f in ctx and match(f)): | 253 if f in ctx and match(f)): |