summaryrefslogtreecommitdiff
path: root/src/buildstream/storage
Commit message (Collapse)AuthorAgeFilesLines
* _casbaseddirectory.py: Use the new _add_entry where possibletlater/CASdiffTristan Daniël Maat2020-02-051-9/+2
|
* _casbaseddirectory.py: Implement `_apply_changes`Tristan Maat2020-02-051-3/+112
| | | | | | | This applies the changes between two CAS directories to a third, avoiding exposure of our internal IndexEntry objects. This is part of CAS support for incremental workspace builds (#985).
* _casbaseddirectory.py: Refactor _add_fileTristan Maat2020-02-051-7/+14
| | | | | For some reason we were directly modifying fields on the object although they can be set comfortably using the constructor.
* storage: Support mtime property in Directory.import_files()Darius Makovsky2020-02-053-20/+86
|
* storage: Use specified mtime in import_filesDarius Makovsky2020-02-053-10/+6
| | | | | If the mtime is specified then try to copy files in file-to-file transfers and reset the mtimes to the parameter value.
* exceptions: Expose ErrorDomain, ErrorLoadReasonThomas Coldrick2020-01-231-1/+2
| | | | | | | Plugin tests are already accessing this API, but using imports from private modules. For motivation for this to be exposed publicly, note that ErrorDomain is an argument for most things in runcli.py, and LoadErrorReason may be another.
* _casbaseddirectory: remove unused _copy_link_from_filesystemDarius Makovsky2019-12-241-3/+0
|
* _casbaseddirectory.py: Add _reset() methodJürg Billeter2019-12-051-1/+6
| | | | This reinitializes a CASBasedDirectory object from a directory digest.
* lint: remove all unecessary elif/else after break/continueBenjamin Schubert2019-12-021-2/+2
| | | | | Newer pylint versions detect and complain about unnecessary elif/else after a continue/break/return clause. Let's remove them
* Reformat code using BlackChandan Singh2019-11-143-81/+112
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* source.py: Add BST_NO_PRESTAGE_KEYDarius Makovsky2019-10-301-0/+1
| | | | | | | | | | Extend Source API Add `_stage_into_cas()` private method. Calls `self.stage` on a `CasBasedDirectory`. If the source sets BST_NO_PRESTAGE_KEY then the casdir is recreated from a stored digest and imported directly in `_stage`.
* _casbaseddirectory.py: Use CASCache.import_directory()juerg/capture-treeJürg Billeter2019-10-021-56/+13
|
* Add initial mypy configuration and typesChandan Singh2019-09-021-13/+15
| | | | | | | | | | As a first step, add type hints to variables whose type `mypy` cannot infer automatically. This is the minimal set of type hints that allow running `mypy` without any arguments, and having it not fail. We currently ignore C extensions that mypy can't process directly. Later, we can look into generating stubs for such modules (potentially automatically).
* Addition of --long option to list-contents:becky/list_contents_long_optionRebecca Grayson2019-09-021-0/+40
| | | | | | | | | --long or -l will provide the user with extra information about the contents of the artifacts, including permission mode, file type, size and name. In order for this to work, the way in which list-contents works has been modified. A test and NEWS entry have also been added within this commit
* types: Add a 'FastEnum' implementation and replace Enum by itBenjamin Schubert2019-07-291-2/+2
| | | | | | | 'Enum' has a big performance impact on the running code. Replacing it with a safe subset of functionality removes lots of this overhead without removing the benefits of using enums (safe comparisions, uniqueness)
* Update sandbox to use virtual directoriesWilliam Salmon2019-07-251-0/+9
|
* Fix descend can not follow symlinksWilliam Salmon2019-07-253-6/+53
|
* Implmented export_to_tar for casbaseddirectoryWilliam Salmon2019-07-251-1/+30
|
* Fix infinite recursion in _partial_import_cas_into_casWilliam Salmon2019-07-251-2/+7
|
* _casbaseddirectory: rm unused methodsAngelos Evripiotis2019-07-091-26/+0
|
* _casbaseddirectory: fix '_mark_changed' spellingAngelos Evripiotis2019-07-091-1/+1
| | | | | Override the base-class method '_mark_changed', instead of declaring a new unused method that only raises NotImplementedError.
* _casbaseddirectory: rm unused exception classesAngelos Evripiotis2019-07-091-29/+0
|
* utils.py: Make `magic_timestamp` a public variableshashwatdalal/make-magic-timestamp-publicShahwat Dalal2019-07-053-7/+7
| | | | | | | Some plugin elements, such as docker-element and tar-element, require to set `created` and/or `modified` meta-data fields. It would be nice to use `magic_timestamp` to ensure these fields are being set in a consistent and deterministic way.
* _filebaseddirectory: match methods to base classAngelos Evripiotis2019-06-181-10/+10
| | | | | | | | | Update import_single_file and export_to_tar to match the Directory base class. This ensures that FileBasedDirectory is a fully substitutable Directory. By making the signatures deliberately match, we can use PyLint to ensure the signatures don't accidentally differ.
* _casbaseddirectory: match methods to base classAngelos Evripiotis2019-06-181-13/+28
| | | | | | | | | Update import_single_file and list_relative_paths to match the Directory base class. This ensures that CasBasedDirectory is a fully substitutable Directory. By making the signatures deliberately match, we can use PyLint to ensure the signatures don't accidentally differ.
* _casbaseddirectory: Add support for can_linkRaoul Hidalgo Charman2019-05-221-9/+17
| | | | | | | Without this, there's not much benefit to using the virtual directories as we still copy files back into the CAS. Part of #983
* Directory: add `import_single_file` methodRaoul Hidalgo Charman2019-05-223-0/+26
| | | | | | | This a new method which deals with importing a single file. Implemented for both FileBasedDirectory and CasBasedDirectory. Part of #983
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-214-0/+1128
This was discussed in #1008. Fixes #1009.