aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-04-22 19:17:12 -0500
committerGitHub <noreply@github.com>2017-04-22 19:17:12 -0500
commitcc74b5b36f03dca9bd543885222ed0e6d91fedcd (patch)
tree18302a5c6da41924f70442bfdc266e21bd4a76c8
parentf795eb1a8b7443ea9dc1cf1c81a6ac0484894659 (diff)
parentc5f13063a52f4ca415f90f3f259072af368ba79c (diff)
downloadservo-cc74b5b36f03dca9bd543885222ed0e6d91fedcd.tar.gz
servo-cc74b5b36f03dca9bd543885222ed0e6d91fedcd.zip
Auto merge of #16573 - UK992:travis, r=aneeshusa
Auto clean old nightlies on Travis This could solve `no space left` problem. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16573) <!-- Reviewable:end -->
-rw-r--r--.travis.yml2
-rw-r--r--python/servo/bootstrap_commands.py13
2 files changed, 6 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index c9652e696a2..d6dc6cc89b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,6 +28,8 @@ matrix:
- .cargo
- .servo
- $HOME/.ccache
+ before_cache:
+ - ./mach clean-nightlies --keep 2 --force
env: CCACHE=/usr/bin/ccache
addons:
apt:
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index 28b5d4fa673..b12d8082d88 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -306,19 +306,14 @@ class MachCommands(CommandBase):
for tool in ["rust", "cargo"]:
commit_file = '{}-commit-hash'.format(tool)
cmd = subprocess.Popen(
- ['git', 'log', '--pretty=format:%H', '-n', keep, commit_file],
+ ['git', 'log', '--oneline', '--no-color', '-n', keep, '--patch', commit_file],
stdout=subprocess.PIPE,
universal_newlines=True
)
stdout, _ = cmd.communicate()
- for commit in stdout.splitlines():
- cmd = subprocess.Popen(
- ['git', 'show', '{}:{}'.format(commit, commit_file)],
- stdout=subprocess.PIPE,
- universal_newlines=True
- )
- commit_hash, _ = cmd.communicate()
- to_keep[tool].add(commit_hash.rstrip())
+ for line in stdout.splitlines():
+ if line.startswith("+") and not line.startswith("+++"):
+ to_keep[tool].add(line[1:])
removing_anything = False
for tool in ["rust", "cargo"]: