Kiln » largefiles » Unity
Clone URL:  

run checkrequireskbfiles once per changegroup rather than once per incoming changeset

Changeset cc99a8e6e2eb

Parent a88d35734fe5

by Profile picture of User 521Andrew Pritchard <andrewp@fogcreek.com>

Changes to one file · Browse files at cc99a8e6e2eb Showing diff from parent a88d35734fe5 Diff from another changeset...

 
417
418
419
420
 
421
422
423
424
 
425
426
427
 
431
432
433
434
 
435
436
437
 
417
418
419
 
420
421
 
 
 
422
423
424
425
 
429
430
431
 
432
433
434
435
@@ -417,11 +417,9 @@
    repo.__class__ = bfiles_repo   - def checkrequireskbfiles(ui, repo, node=None, source=None, url=None): + def checkrequireskbfiles(ui, repo, **kwargs):   if 'kbfiles' not in repo.requirements: - if (node is not None and repo.manifest(node).find('.kbf/')[0] \ - is not None) or (bfutil.any_('.kbf/' in f[0] \ - for f in repo.store.datafiles())): + if bfutil.any_('.kbf/' in f[0] for f in repo.store.datafiles()):   # work around bug in mercurial 1.9 whereby requirements is a list   # on newly-cloned repos   repo.requirements = set(repo.requirements) @@ -431,7 +429,7 @@
    checkrequireskbfiles(ui, repo)   - ui.setconfig('hooks', 'incoming.kbfiles', checkrequireskbfiles) + ui.setconfig('hooks', 'changegroup.kbfiles', checkrequireskbfiles)   ui.setconfig('hooks', 'commit.kbfiles', checkrequireskbfiles)    # Add works by going through the files that the user wanted to add