equal
deleted
inserted
replaced
482 # (eg: .hg/hgrc) |
482 # (eg: .hg/hgrc) |
483 assert repo.vfs not in vfsmap.values() |
483 assert repo.vfs not in vfsmap.values() |
484 |
484 |
485 return vfsmap |
485 return vfsmap |
486 |
486 |
487 def _emit(repo, entries, totalfilesize): |
487 def _emit2(repo, entries, totalfilesize): |
488 """actually emit the stream bundle""" |
488 """actually emit the stream bundle""" |
489 vfsmap = _makemap(repo) |
489 vfsmap = _makemap(repo) |
490 progress = repo.ui.progress |
490 progress = repo.ui.progress |
491 progress(_('bundle'), 0, total=totalfilesize, unit=_('bytes')) |
491 progress(_('bundle'), 0, total=totalfilesize, unit=_('bytes')) |
492 with maketempcopies() as copy: |
492 with maketempcopies() as copy: |
553 for name in cacheutil.cachetocopy(repo): |
553 for name in cacheutil.cachetocopy(repo): |
554 if repo.cachevfs.exists(name): |
554 if repo.cachevfs.exists(name): |
555 totalfilesize += repo.cachevfs.lstat(name).st_size |
555 totalfilesize += repo.cachevfs.lstat(name).st_size |
556 entries.append((_srccache, name, _filefull, None)) |
556 entries.append((_srccache, name, _filefull, None)) |
557 |
557 |
558 chunks = _emit(repo, entries, totalfilesize) |
558 chunks = _emit2(repo, entries, totalfilesize) |
559 first = next(chunks) |
559 first = next(chunks) |
560 assert first is None |
560 assert first is None |
561 |
561 |
562 return len(entries), totalfilesize, chunks |
562 return len(entries), totalfilesize, chunks |
563 |
563 |