Auto merge of #18953 - servo:keep, r=jdm

Fix './mach clean-nightlies --keep 3' not keeping anything.

This affects CI, re-downloading Nightly for every build.

<!-- 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/18953)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-20 10:06:31 -05:00 committed by GitHub
commit d4bdb8b293

View file

@ -308,7 +308,10 @@ class MachCommands(CommandBase):
stdout, _ = cmd.communicate() stdout, _ = cmd.communicate()
for line in stdout.splitlines(): for line in stdout.splitlines():
if line.startswith(b"+") and not line.startswith(b"+++"): if line.startswith(b"+") and not line.startswith(b"+++"):
to_keep.add(line[1:]) line = line[len(b"+"):]
if line.startswith(b"nightly-"):
line = line[len(b"nightly-"):]
to_keep.add(line)
removing_anything = False removing_anything = False
for tool in ["rust", "cargo"]: for tool in ["rust", "cargo"]: