Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sage_patchbot/patchbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,6 @@ def test_a_ticket(self, ticket=None):

# ------------- pull and apply -------------
pull_from_trac(self.sage_root, ticket['id'], force=True,
use_ccache=self.config['use_ccache'],
safe_only=self.config['safe_only'])
t.finish("Apply")
state = 'applied'
Expand Down
14 changes: 2 additions & 12 deletions sage_patchbot/trac.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,13 @@ def inplace_safe():


def pull_from_trac(sage_root, ticket_id, branch=None, force=None,
use_ccache=False,
safe_only=False):
"""
Create four branches from base and ticket.

If ticket deemed unsafe then clone git repo to temp directory. ?!
If ticket deemed unsafe then clone git repo to temp directory.

Additionally, if ``use_ccache`` then install ccache. Set some global
and environment variables.
Set some global and environment variables.

There are four branches at play here:

Expand Down Expand Up @@ -354,19 +352,11 @@ def pull_from_trac(sage_root, ticket_id, branch=None, force=None,
do_or_die("git branch -f patchbot/ticket_upstream remotes/origin/patchbot/ticket_upstream")
do_or_die("make configure")
do_or_die("./configure")
if use_ccache:
if not os.path.exists('logs'):
os.mkdir('logs')
do_or_die("./sage -i ccache")
except Exception as exn:
if merge_failure or (not is_safe):
raise
else:
raise ConfigException(exn.message)
finally:
if not is_safe and not safe_only:
if temp_dir and os.path.exists(temp_dir):
shutil.rmtree(temp_dir) # delete temporary dir

# ===================

Expand Down