##// END OF EJS Templates
lfs: defer registering the pre-push hook until blobs are committed...
Matt Harbison -
r35753:693e3bca default
parent child Browse files
Show More
@@ -160,9 +160,6 b' def reposetup(ui, repo):'
160 160 repo.svfs.lfslocalblobstore = blobstore.local(repo)
161 161 repo.svfs.lfsremoteblobstore = blobstore.remote(repo)
162 162
163 # Push hook
164 repo.prepushoutgoinghooks.add('lfs', wrapper.prepush)
165
166 163 class lfsrepo(repo.__class__):
167 164 @localrepo.unfilteredmethod
168 165 def commitctx(self, ctx, error=False):
@@ -185,10 +182,13 b' def reposetup(ui, repo):'
185 182 if any(ctx[f].islfs() for f in ctx.files() if f in ctx):
186 183 repo.requirements.add('lfs')
187 184 repo._writerequirements()
185 repo.prepushoutgoinghooks.add('lfs', wrapper.prepush)
188 186 break
189 187
190 188 ui.setconfig('hooks', 'commit.lfs', checkrequireslfs, 'lfs')
191 189 ui.setconfig('hooks', 'pretxnchangegroup.lfs', checkrequireslfs, 'lfs')
190 else:
191 repo.prepushoutgoinghooks.add('lfs', wrapper.prepush)
192 192
193 193 def _trackedmatcher(repo, ctx):
194 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