Skip to content

Commit

Permalink
Merge 9bcaca4 into 77e549a
Browse files Browse the repository at this point in the history
  • Loading branch information
dturner-tw committed Mar 20, 2015
2 parents 77e549a + 9bcaca4 commit 73c28f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/python/pants/backend/core/tasks/what_changed.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ def change_calculator(cls, options, address_mapper, build_graph, scm=None, works


class WhatChanged(ConsoleTask, ChangedFileTaskMixin):
def __init__(self, *args, **kwargs):
super(WhatChanged, self).__init__(*args, **kwargs)
self._spec_excludes = self.context.options.for_global_scope().spec_excludes

"""Emits the targets that have been modified since a given commit."""
@classmethod
def register_options(cls, register):
Expand All @@ -160,12 +156,13 @@ def register_options(cls, register):
help='Show changed files instead of the targets that own them.')

def console_output(self, _):
spec_excludes = self.context.options.for_global_scope().spec_excludes
change_calculator = self.change_calculator(self.get_options(),
self.context.address_mapper,
self.context.build_graph,
scm=self.context.scm,
workspace=self.context.workspace,
spec_excludes=self._spec_excludes)
spec_excludes=spec_excludes)
if self.get_options().files:
for f in sorted(change_calculator.changed_files()):
yield f
Expand Down
5 changes: 3 additions & 2 deletions src/python/pants/cache/cache_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def create_artifact_cache(log, artifact_root, spec, task_name, compression,
"""
if not spec:
raise EmptyCacheSpecError()
if not isinstance(compression, (int, long)):
raise ValueError('compression value must be an integer: {comp}'.format(comp=compression))
if not compression in range(10):
raise ValueError('compression value must be an integer between 0 and 9 inclusive: {com}'.format(
com=compression))

def recurse(new_spec, new_local=local):
return create_artifact_cache(log=log, artifact_root=artifact_root, spec=new_spec,
Expand Down

0 comments on commit 73c28f7

Please sign in to comment.