try:
# Create a new temporary directory and check out the requested revision
async with self.backend.tempdir() as path:
- await self.source.git.checkout(self.commit.revision, path)
+ await self.source.git.checkout(self.commit.revision, path, self.name)
# Create a path for the source packages
target = os.path.join(path, ".target")
return files
- async def checkout(self, revision, path):
+ async def checkout(self, revision, destination, path=None):
"""
Creates a working directory at the revision in path
"""
await self.command(
# Set the destination path as work tree
- "--work-tree", path,
+ "--work-tree", destination,
# Perform a checkout of the specified revision
- "checkout", revision, ".",
+ "checkout", revision, path or ".",
)