git_archive_all_1.py 510 B

123456789101112
  1. def archive_all_files(self, archiver):
  2. """
  3. Archive all files using archiver.
  4. @param archiver: Callable that accepts 2 arguments:
  5. abspath to file on the system and relative path within archive.
  6. """
  7. for file_path in self.extra:
  8. archiver(path.abspath(file_path), path.join(self.prefix, file_path))
  9. for file_path in self.walk_git_files():
  10. archiver(path.join(self.main_repo_abspath, file_path), path.join(self.prefix, file_path))