equal
deleted
inserted
replaced
123 from __future__ import absolute_import |
123 from __future__ import absolute_import |
124 |
124 |
125 import sys |
125 import sys |
126 |
126 |
127 from mercurial.i18n import _ |
127 from mercurial.i18n import _ |
|
128 from mercurial.node import bin |
128 |
129 |
129 from mercurial import ( |
130 from mercurial import ( |
130 bundlecaches, |
131 bundlecaches, |
131 config, |
132 config, |
132 context, |
133 context, |
135 exthelper, |
136 exthelper, |
136 filelog, |
137 filelog, |
137 filesetlang, |
138 filesetlang, |
138 localrepo, |
139 localrepo, |
139 minifileset, |
140 minifileset, |
140 node, |
|
141 pycompat, |
141 pycompat, |
142 revlog, |
142 revlog, |
143 scmutil, |
143 scmutil, |
144 templateutil, |
144 templateutil, |
145 util, |
145 util, |
258 def checkrequireslfs(ui, repo, **kwargs): |
258 def checkrequireslfs(ui, repo, **kwargs): |
259 if b'lfs' in repo.requirements: |
259 if b'lfs' in repo.requirements: |
260 return 0 |
260 return 0 |
261 |
261 |
262 last = kwargs.get('node_last') |
262 last = kwargs.get('node_last') |
263 _bin = node.bin |
|
264 if last: |
263 if last: |
265 s = repo.set(b'%n:%n', _bin(kwargs['node']), _bin(last)) |
264 s = repo.set(b'%n:%n', bin(kwargs['node']), bin(last)) |
266 else: |
265 else: |
267 s = repo.set(b'%n', _bin(kwargs['node'])) |
266 s = repo.set(b'%n', bin(kwargs['node'])) |
268 match = repo._storenarrowmatch |
267 match = repo._storenarrowmatch |
269 for ctx in s: |
268 for ctx in s: |
270 # TODO: is there a way to just walk the files in the commit? |
269 # TODO: is there a way to just walk the files in the commit? |
271 if any( |
270 if any( |
272 ctx[f].islfs() for f in ctx.files() if f in ctx and match(f) |
271 ctx[f].islfs() for f in ctx.files() if f in ctx and match(f) |