mirror of
https://github.com/odoo/runbot.git
synced 2025-05-31 21:58:00 +07:00
[IMP] forwardport: move working copy to the cache dir
Working copies were created in tempdir under the assumption that they're, well, temporary. However after thinking about it more there are two issues with this: * tempdirs might not be in the same FS as the cache dir, meaning meaning `git clone` can't hardlink the repo objects and has to copy them * tempdirs are often on RAM-backed tmpfs, which is not great when we're filling them with multiple GB worth of git repository...
This commit is contained in:
parent
f8da17994a
commit
a1a7d65ebe
@ -522,7 +522,15 @@ More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port
|
||||
_logger.info("Create working copy to forward-port %s:%d to %s",
|
||||
self.repository.name, self.number, target_branch.name)
|
||||
working_copy = source.clone(
|
||||
cleanup.enter_context(tempfile.TemporaryDirectory()),
|
||||
cleanup.enter_context(
|
||||
tempfile.TemporaryDirectory(
|
||||
prefix='%s:%d-to-%s' % (
|
||||
self.repository.name,
|
||||
self.number,
|
||||
target_branch.name
|
||||
),
|
||||
dir=user_cache_dir('forwardport')
|
||||
)),
|
||||
branch=target_branch.name
|
||||
)
|
||||
project_id = self.repository.project_id
|
||||
|
Loading…
Reference in New Issue
Block a user