| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
For some reason we were directly modifying fields on the object
although they can be set comfortably using the constructor.
|
| |
|
|
|
|
|
| |
If the mtime is specified then try to copy files in file-to-file
transfers and reset the mtimes to the parameter value.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This reinitializes a CASBasedDirectory object from a directory digest.
|
|
|
|
|
| |
Newer pylint versions detect and complain about unnecessary elif/else
after a continue/break/return clause. Let's remove them
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
--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
|
|
|
|
|
|
|
| |
'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)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Override the base-class method '_mark_changed', instead of declaring a
new unused method that only raises NotImplementedError.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Without this, there's not much benefit to using the virtual directories
as we still copy files back into the CAS.
Part of #983
|
|
|
|
|
|
|
| |
This a new method which deals with importing a single file.
Implemented for both FileBasedDirectory and CasBasedDirectory.
Part of #983
|
|
This was discussed in #1008.
Fixes #1009.
|