Show More
@@ -551,10 +551,9 b' def unixpath(path):' | |||
|
551 | 551 | |
|
552 | 552 | def islfilesrepo(repo): |
|
553 | 553 | '''Return true if the repo is a largefile repo.''' |
|
554 |
if b'largefiles' in repo.requirements |
|
|
555 | shortnameslash in entry.unencoded_path | |
|
556 | for entry in repo.store.datafiles() | |
|
557 | ): | |
|
554 | if b'largefiles' in repo.requirements: | |
|
555 | for entry in repo.store.datafiles(): | |
|
556 | if entry.is_revlog and shortnameslash in entry.target_id: | |
|
558 | 557 | return True |
|
559 | 558 | |
|
560 | 559 | return any(openlfdirstate(repo.ui, repo, False)) |
@@ -457,12 +457,16 b' def reposetup(ui, repo):' | |||
|
457 | 457 | |
|
458 | 458 | def checkrequireslfiles(ui, repo, **kwargs): |
|
459 | 459 | with repo.lock(): |
|
460 |
if b'largefiles' |
|
|
461 | lfutil.shortname + b'/' in entry.unencoded_path | |
|
462 | for entry in repo.store.datafiles() | |
|
463 | ): | |
|
460 | if b'largefiles' in repo.requirements: | |
|
461 | return | |
|
462 | marker = lfutil.shortnameslash | |
|
463 | for entry in repo.store.datafiles(): | |
|
464 | # XXX note that this match is not rooted and can wrongly match | |
|
465 | # directory ending with ".hglf" | |
|
466 | if entry.is_revlog and marker in entry.target_id: | |
|
464 | 467 | repo.requirements.add(b'largefiles') |
|
465 | 468 | scmutil.writereporequirements(repo) |
|
469 | break | |
|
466 | 470 | |
|
467 | 471 | ui.setconfig( |
|
468 | 472 | b'hooks', b'changegroup.lfiles', checkrequireslfiles, b'largefiles' |
General Comments 0
You need to be logged in to leave comments.
Login now