Show More
@@ -124,15 +124,7 b' def reposetup(ui, repo):' | |||||
124 | if not repo.local(): |
|
124 | if not repo.local(): | |
125 | return |
|
125 | return | |
126 |
|
126 | |||
127 | trackspec = repo.ui.config('lfs', 'track') |
|
127 | repo.svfs.options['lfstrack'] = _trackedmatcher(repo) | |
128 |
|
||||
129 | # deprecated config: lfs.threshold |
|
|||
130 | threshold = repo.ui.configbytes('lfs', 'threshold') |
|
|||
131 | if threshold: |
|
|||
132 | fileset.parse(trackspec) # make sure syntax errors are confined |
|
|||
133 | trackspec = "(%s) | size('>%d')" % (trackspec, threshold) |
|
|||
134 |
|
||||
135 | repo.svfs.options['lfstrack'] = minifileset.compile(trackspec) |
|
|||
136 | repo.svfs.lfslocalblobstore = blobstore.local(repo) |
|
128 | repo.svfs.lfslocalblobstore = blobstore.local(repo) | |
137 | repo.svfs.lfsremoteblobstore = blobstore.remote(repo) |
|
129 | repo.svfs.lfsremoteblobstore = blobstore.remote(repo) | |
138 |
|
130 | |||
@@ -158,6 +150,19 b' def reposetup(ui, repo):' | |||||
158 | ui.setconfig('hooks', 'commit.lfs', checkrequireslfs, 'lfs') |
|
150 | ui.setconfig('hooks', 'commit.lfs', checkrequireslfs, 'lfs') | |
159 | ui.setconfig('hooks', 'pretxnchangegroup.lfs', checkrequireslfs, 'lfs') |
|
151 | ui.setconfig('hooks', 'pretxnchangegroup.lfs', checkrequireslfs, 'lfs') | |
160 |
|
152 | |||
|
153 | def _trackedmatcher(repo): | |||
|
154 | """Return a function (path, size) -> bool indicating whether or not to | |||
|
155 | track a given file with lfs.""" | |||
|
156 | trackspec = repo.ui.config('lfs', 'track') | |||
|
157 | ||||
|
158 | # deprecated config: lfs.threshold | |||
|
159 | threshold = repo.ui.configbytes('lfs', 'threshold') | |||
|
160 | if threshold: | |||
|
161 | fileset.parse(trackspec) # make sure syntax errors are confined | |||
|
162 | trackspec = "(%s) | size('>%d')" % (trackspec, threshold) | |||
|
163 | ||||
|
164 | return minifileset.compile(trackspec) | |||
|
165 | ||||
161 | def wrapfilelog(filelog): |
|
166 | def wrapfilelog(filelog): | |
162 | wrapfunction = extensions.wrapfunction |
|
167 | wrapfunction = extensions.wrapfunction | |
163 |
|
168 |
General Comments 0
You need to be logged in to leave comments.
Login now