ecdbf24fcaa1c8586a3d3acc1bba87aea974d7e3,src/python/pants/tasks/what_changed.py,WhatChanged,_owns,#WhatChanged#Any#Any#,101

Before Change


  def _owns(self, target, path):
    if target not in self._filemap:
      files = self._filemap[target]
      files_owned_by_target = (target.sources_relative_to_buildroot() if target.has_sources()
                               else [])
      // TODO (tdesai): This case to handle resources in PythonTarget.
      // Remove this when we normalize resources handling across python and jvm targets.
      if target.has_resources:
        for resource in target.resources:
          full_resource_path = os.path.join(target.payload.sources_rel_path, resource)
          files_owned_by_target.append(full_resource_path)
      for owned_file in files_owned_by_target:
        files.add(owned_file)
    return path in self._filemap[target]


class Workspace(AbstractClass):

After Change



  def _owns(self, target, path):
    if target not in self._filemap:
      self._filemap[target] = set(target.sources_relative_to_buildroot())
    return path in self._filemap[target]

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: ecdbf24fcaa1c8586a3d3acc1bba87aea974d7e3
Time: 2014-05-21
Author: benjy@foursquare.com
File Name: src/python/pants/tasks/what_changed.py
Class Name: WhatChanged
Method Name: _owns


Project Name: pantsbuild/pants
Commit Name: 91f0e27b4d7e94e0e5cafe1c2a6fb37c80ab8b41
Time: 2015-08-19
Author: john.sirois@gmail.com
File Name: contrib/go/src/python/pants/contrib/go/tasks/go_workspace_task.py
Class Name: GoWorkspaceTask
Method Name: _symlink_local_src


Project Name: pantsbuild/pants
Commit Name: 2c68fc2c8ad84dea08041cd07e7968263aa41e39
Time: 2015-12-28
Author: stuhood@gmail.com
File Name: src/python/pants/backend/codegen/tasks/protobuf_gen.py
Class Name: ProtobufGen
Method Name: _calculate_sources