Show More
@@ -160,9 +160,6 b' def reposetup(ui, repo):' | |||||
160 | repo.svfs.lfslocalblobstore = blobstore.local(repo) |
|
160 | repo.svfs.lfslocalblobstore = blobstore.local(repo) | |
161 | repo.svfs.lfsremoteblobstore = blobstore.remote(repo) |
|
161 | repo.svfs.lfsremoteblobstore = blobstore.remote(repo) | |
162 |
|
162 | |||
163 | # Push hook |
|
|||
164 | repo.prepushoutgoinghooks.add('lfs', wrapper.prepush) |
|
|||
165 |
|
||||
166 | class lfsrepo(repo.__class__): |
|
163 | class lfsrepo(repo.__class__): | |
167 | @localrepo.unfilteredmethod |
|
164 | @localrepo.unfilteredmethod | |
168 | def commitctx(self, ctx, error=False): |
|
165 | def commitctx(self, ctx, error=False): | |
@@ -185,10 +182,13 b' def reposetup(ui, repo):' | |||||
185 | if any(ctx[f].islfs() for f in ctx.files() if f in ctx): |
|
182 | if any(ctx[f].islfs() for f in ctx.files() if f in ctx): | |
186 | repo.requirements.add('lfs') |
|
183 | repo.requirements.add('lfs') | |
187 | repo._writerequirements() |
|
184 | repo._writerequirements() | |
|
185 | repo.prepushoutgoinghooks.add('lfs', wrapper.prepush) | |||
188 | break |
|
186 | break | |
189 |
|
187 | |||
190 | ui.setconfig('hooks', 'commit.lfs', checkrequireslfs, 'lfs') |
|
188 | ui.setconfig('hooks', 'commit.lfs', checkrequireslfs, 'lfs') | |
191 | ui.setconfig('hooks', 'pretxnchangegroup.lfs', checkrequireslfs, 'lfs') |
|
189 | ui.setconfig('hooks', 'pretxnchangegroup.lfs', checkrequireslfs, 'lfs') | |
|
190 | else: | |||
|
191 | repo.prepushoutgoinghooks.add('lfs', wrapper.prepush) | |||
192 |
|
192 | |||
193 | def _trackedmatcher(repo, ctx): |
|
193 | def _trackedmatcher(repo, ctx): | |
194 | """Return a function (path, size) -> bool indicating whether or not to |
|
194 | """Return a function (path, size) -> bool indicating whether or not to |
General Comments 0
You need to be logged in to leave comments.
Login now