summaryrefslogtreecommitdiff
path: root/buildstream/plugins/sources/git.py
Commit message (Collapse)AuthorAgeFilesLines
* git.py source plugin: Prune remote-tracking branches when fetchingsam/git-fetch-pruneSam Thursfield2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed this issue when running `bst track` on a system that contained GLIBC. The following error occurred: [--:--:--] START [gnu-toolchain/stage2-glibc.bst]: Tracking release/2.25/master from git://git.baserock.org/delta/glibc Running host command /home/fedora/src/baserock/definitions/.cache/buildstream/sources/git/git___git_baserock_org_delta_glibc: /usr/bin/git fetch origin [--:--:--] STATUS [gnu-toolchain/stage2-glibc.bst]: Running host command /usr/bin/git fetch origin error: cannot lock ref 'refs/heads/hjl/memcpy/dpdk/master': 'refs/heads/hjl/memcpy' exists; cannot create 'refs/heads/hjl/memcpy/dpdk/master' From git://git.baserock.org/delta/glibc ! [new branch] hjl/memcpy/dpdk/master -> hjl/memcpy/dpdk/master (unable to update local ref) error: cannot lock ref 'refs/heads/hjl/x86/master': 'refs/heads/hjl/x86' exists; cannot create 'refs/heads/hjl/x86/master' ! [new branch] hjl/x86/master -> hjl/x86/master (unable to update local ref) error: cannot lock ref 'refs/heads/hjl/x86/math': 'refs/heads/hjl/x86' exists; cannot create 'refs/heads/hjl/x86/math' ! [new branch] hjl/x86/math -> hjl/x86/math (unable to update local ref) error: cannot lock ref 'refs/heads/hjl/x86/optimize': 'refs/heads/hjl/x86' exists; cannot create 'refs/heads/hjl/x86/optimize' ! [new branch] hjl/x86/optimize -> hjl/x86/optimize (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches git source at gnu-toolchain/stage2-glibc.bst [line 4 column 2]: Failed to fetch from remote git repository: git://git.baserock.org/delta/glibc The issue here is that my local clone had old remote-tracking refs which conflicted with newer upstream refs. For example, there used to be a ref named `hlj/memcpy` which I had mirrored locally. This has been deleted and now a ref exists named `hlj/memcpy/dpdk/master`. The new ref cannot be pulled because Git considers it to conflict with the old one. The solution is to use `git fetch --prune` when updating so that Git removes any outdated remote-tracking refs before trying to create any new ones.
* refactoring: Made Project option privateTristan Van Berkom2017-11-061-2/+1
| | | | | | | | | | | | | | This required adding two new APIs to make up for it on the Source o get_project_directory() Added here because elements should not be accessing external resources, Sources needed for local files and GPG keys and such o translate_url() Used by sources to mish-mash the project aliases and create real urls.
* git.py source plugin: More informative error when missing track & refTristan Van Berkom2017-10-141-1/+1
|
* Add source plugin node validationsTristan Maat2017-09-141-0/+2
|
* git.py source plugin: Consider submodules in cache keyTristan Van Berkom2017-09-011-1/+8
| | | | | | | | NOTE: This changes cache keys for existing sources which have submodules configured. Presence of submodules in the source configuration changes the configuration significantly, this should be considered in cache keys.
* git.py source plugin: Avoid deprecated RawConfigParser.readfp() methodSam Thursfield2017-06-221-1/+1
| | | | | | | | | In Python 3.2 this was renamed to read_file(), and use of readfp() earns us a deprecation warning when running the test suite: tests/sources/git.py::test_submodule_fetch /home/shared/src/buildstream/buildstream/plugins/sources/git.py:172: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. parser.readfp(io)
* git.py source plugin: Use Source.tempdir() context managerTristan Van Berkom2017-04-081-9/+9
|
* git.py source plugin: Fixed staging of submodules.Tristan Van Berkom2017-04-071-0/+7
| | | | | | | | | This was failing only the first time around, if the pipeline was loaded and the git mirror for the primary module is not yet present. Need to re-introspect the presence of submodules at stage time just so that the GitSource knows to stage submodules which is previously fetched at fetch() time.
* Fixing permissions, some random python files became executableTristan Van Berkom2017-03-061-0/+0
|
* git.py source plugin: Swapping around the loggingTristan Van Berkom2017-03-021-47/+52
| | | | Less logging, silent nested activities too.
* git.py source plugin: Use Mapping in _yaml.node_get()Tristan Van Berkom2017-02-261-3/+3
| | | | | This is more accurate than 'dict', it can be a ChainMap sometimes which will not be a 'dict'
* git.py source plugin: Removed obsolete line of code.Tristan Van Berkom2017-02-111-1/+0
|
* Remove apostrophes from grammatically incorrect instances of "it's"Paul Sherwood2017-02-111-1/+1
|
* git.py plugin: Adapt to new get_consistency() API and moreTristan Van Berkom2017-01-191-3/+25
| | | | | | Also added have_all_refs() helper and ensure that we only report a Consistency.CACHED state if all submodules are also ready for checkout.
* git.py: Updated for new source APITristan Van Berkom2017-01-181-24/+20
|
* git.py: Fixed internal has_ref() to be None safeTristan Van Berkom2017-01-181-0/+2
|
* git.py source plugin: Raise error if neither source or ref are specifiedTristan Van Berkom2017-01-161-5/+6
|
* git plugin: Updated for new check_output() apiTristan Van Berkom2017-01-141-16/+17
|
* git.py: Use plugin helpers for calling host toolsTristan Van Berkom2017-01-131-54/+33
| | | | This takes the problem of logging away completely.
* git.py: Use plugin timed task context managerTristan Van Berkom2017-01-121-30/+32
|
* git.py source plugin: Use context manager for tmpdir in build directoryTristan Van Berkom2017-01-111-12/+14
| | | | | | Maybe we aught to add a 'tmp' directory separate from the build directory. This commit also fixes the lookup for submodules by their path.
* git source plugin: Removed pointless project variablesTristan Van Berkom2017-01-101-3/+0
| | | | These are left over from pre-submodule days
* git.py source plugin: Implement consistent()Tristan Van Berkom2017-01-091-0/+5
|
* git.py source plugin: Now refresh() returns booleanTristan Van Berkom2017-01-071-4/+11
|
* git.py source plugin: Use Plugin node parsing utilitiesTristan Van Berkom2017-01-071-7/+7
|
* git plugin: Dont require the ref to exist after fetchingTristan Van Berkom2017-01-041-5/+8
| | | | This is needed for refresh functionality.
* git plugin: Support submodulesTristan Van Berkom2017-01-031-70/+239
| | | | | Ensure submodules are updated and refreshed at source->refresh() and source->fetch() time, support staging etc.
* git source plugin: Fleshing out initial implementationTristan Van Berkom2016-12-191-3/+138
|
* pep8 fixes in git.py (source plugin)Tristan Van Berkom2016-12-101-0/+2
|
* Adding skeleton for the 'git' Source kindTristan Van Berkom2016-11-081-0/+29