summaryrefslogtreecommitdiff
path: root/buildstream/_gitsourcebase.py
Commit message (Collapse)AuthorAgeFilesLines
* Plugin: Remove node_has_member()Daniel Silverstone2019-04-041-1/+1
| | | | | | | Now that we permit `key in somenode` again, remove the unnecessary extra API of Plugin.node_has_member() Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* lint: Fix or silence 'cyclic-import' errors and enable pylint for itBenjamin Schubert2019-04-011-3/+4
| | | | | | | | Cyclic imports can be confusing because the order in which we import dependencies can make the import fail or not. We should not rely on ordering of imports for our code. This fixes everywhere possible the imports and silence explicitely some which are not convenient or would require big refactors
* The new YAML World OrderDaniel Silverstone2019-03-271-1/+1
| | | | | | | | | Replace YAML internals with a new Node type, and refactor everything to use it cleanly. This work was also by James Ennis <james.ennis@codethink.co.uk> Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* _gitsourcebase.py: Make mirror class used by derived plugins overridablePhil Dawson2019-03-071-3/+8
| | | | | | | | | | We want it to be possible for plugin authors writing git type plugins derrived from _GitSourceBase to be able to make use of custom _GitMirror classes. Add a MirrorClass class variable to _GitSourceBase which can be overriden by derriving classes. This allows plugin authors to specify the use of custom/derrived _GitMirror class.
* Expose _GitMirror as part of plugin author facing APIChandan Singh2019-03-071-5/+5
| | | | | | | | In !1019, we opened up the `_GitSourceBase()` class but forgot to expose the `GitMirror()` class that does most of the heavy lifting around handling the Git repository. So, add it to `__init__.py` as well, but not as a public API.
* Use [a, b, *c] instead of [a, b] + c when building listbschubert/more-pythonic-list-concatBenjamin Schubert2019-03-011-1/+1
| | | | | This pattern is available from python3.5 and provides a simpler understanding of what is going on
* Fixup refs to 'bst track'Angelos Evripiotis2019-01-281-1/+1
| | | | | Now that 'bst track' is obsolete, change guidance to refer to the replacement 'bst source track' instead.
* _gitsourcebase.py: Fetch with explicit refspecsRichard Maw2019-01-211-1/+2
| | | | | Old versions of git lack --force and --tags, but the same effect can be had by specifying refspecs.
* buildstream/_gitsourcebase.py: Fix case where HEAD is taggedValentin David2019-01-161-13/+18
| | | | | `git rev-list --boundary HEAD..HEAD` does not return any boundary. So in this case we need to manually tag the HEAD as a boundary.
* buildstream/_gitsourcebase.py: Reduce git history for git describe.Valentin David2019-01-161-1/+2
| | | | | | | | | | | | Found during #833. `git rev-list --boundary tag..HEAD` unfortunately gives boundaries that are deeper than should when there is a merge commit between `tag` and `HEAD`. The common ancestory of the two parents of the merge is a boundary instead of the parent of the branch that is not traversed. `--ancestry-path` fixes this issue by restricting `git` traversing those branches.
* Expose base class for Git source pluginsChandan Singh2018-12-201-0/+670
Add a `_GitSourceBase` class to act as the base class for deriving source plugins that work with Git. The first user of this base class is the `git` source plugin that's in core at the moment. The contents of this base class is almost identical to the existing `GitSource` class. The two notable differences are: - the private methods now have leading underscores, as some were missing it originally - the name of the class Note that we are exposing a private member here as we expect it to move to a separate package soon. See the following discussion for more details: https://gitlab.com/BuildStream/buildstream/issues/739#note_124819869 Fixes #739.