From 9c981eff859c2c61d46ac50651fcda864c25a8bf Mon Sep 17 00:00:00 2001 From: Angelos Evripiotis Date: Fri, 18 Jan 2019 17:03:12 +0000 Subject: Fixup refs to 'bst track' Now that 'bst track' is obsolete, change guidance to refer to the replacement 'bst source track' instead. --- buildstream/_gitsourcebase.py | 2 +- buildstream/_loader/loader.py | 2 +- buildstream/_pipeline.py | 2 +- buildstream/plugins/elements/junction.py | 2 +- buildstream/plugins/sources/bzr.py | 2 +- buildstream/plugins/sources/deb.py | 2 +- buildstream/plugins/sources/git.py | 2 +- buildstream/plugins/sources/remote.py | 2 +- buildstream/plugins/sources/tar.py | 2 +- buildstream/plugins/sources/zip.py | 2 +- doc/source/format_project_refs.rst | 4 ++-- tests/frontend/completions.py | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/buildstream/_gitsourcebase.py b/buildstream/_gitsourcebase.py index 1d33bd539..b986f7543 100644 --- a/buildstream/_gitsourcebase.py +++ b/buildstream/_gitsourcebase.py @@ -605,7 +605,7 @@ class _GitSourceBase(Source): detail = "The ref provided for the element does not exist locally " + \ "in the provided track branch / tag '{}'.\n".format(self.tracking) + \ "You may wish to track the element to update the ref from '{}' ".format(self.tracking) + \ - "with `bst track`,\n" + \ + "with `bst source track`,\n" + \ "or examine the upstream at '{}' for the specific ref.".format(self.mirror.url) self.warn("{}: expected ref '{}' was not found in given track '{}' for staged repository: '{}'\n" diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py index 16e880388..25c263011 100644 --- a/buildstream/_loader/loader.py +++ b/buildstream/_loader/loader.py @@ -565,7 +565,7 @@ class Loader(): # Handle the case where a subproject has no ref # elif source.get_consistency() == Consistency.INCONSISTENT: - detail = "Try tracking the junction element with `bst track {}`".format(filename) + detail = "Try tracking the junction element with `bst source track {}`".format(filename) raise LoadError(LoadErrorReason.SUBPROJECT_INCONSISTENT, "Subproject has no ref for junction: {}".format(filename), detail=detail) diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index 3dc3019eb..8f6c78894 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -373,7 +373,7 @@ class Pipeline(): if source._get_consistency() == Consistency.INCONSISTENT: detail += " {} is missing ref\n".format(source) detail += '\n' - detail += "Try tracking these elements first with `bst track`\n" + detail += "Try tracking these elements first with `bst source track`\n" raise PipelineError("Inconsistent pipeline", detail=detail, reason="inconsistent-pipeline") diff --git a/buildstream/plugins/elements/junction.py b/buildstream/plugins/elements/junction.py index 7f9817359..a2ae3b6cb 100644 --- a/buildstream/plugins/elements/junction.py +++ b/buildstream/plugins/elements/junction.py @@ -79,7 +79,7 @@ depend on a junction element itself. Therefore, if you require the most up-to-date version of a subproject, you must explicitly track the junction element by invoking: - `bst track JUNCTION_ELEMENT`. + `bst source track JUNCTION_ELEMENT`. Furthermore, elements within the subproject are also not tracked by default. For this, we must specify the `--track-cross-junctions` option. This option diff --git a/buildstream/plugins/sources/bzr.py b/buildstream/plugins/sources/bzr.py index 5b993c043..de5dbdcc7 100644 --- a/buildstream/plugins/sources/bzr.py +++ b/buildstream/plugins/sources/bzr.py @@ -46,7 +46,7 @@ bzr - stage files from a bazaar repository # but revisions on a branch are of the form # .. # e.g. 6622.1.6. - # The ref must be specified to build, and 'bst track' will update the + # The ref must be specified to build, and 'bst source track' will update the # revision number to the one on the tip of the branch specified in 'track'. ref: 6622 diff --git a/buildstream/plugins/sources/deb.py b/buildstream/plugins/sources/deb.py index 1b7dafd31..e45994951 100644 --- a/buildstream/plugins/sources/deb.py +++ b/buildstream/plugins/sources/deb.py @@ -34,7 +34,7 @@ deb - stage files from .deb packages kind: deb # Specify the deb url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo.deb diff --git a/buildstream/plugins/sources/git.py b/buildstream/plugins/sources/git.py index 4160797d6..5e6834979 100644 --- a/buildstream/plugins/sources/git.py +++ b/buildstream/plugins/sources/git.py @@ -112,7 +112,7 @@ git - stage files from a git repository # o Enable `track-tags` feature # o Set the `track` parameter to the desired commit sha which # the current `ref` points to - # o Run `bst track` for these elements, this will result in + # o Run `bst source track` for these elements, this will result in # populating the `tags` portion of the refs without changing # the refs # o Restore the `track` parameter to the branches which you have diff --git a/buildstream/plugins/sources/remote.py b/buildstream/plugins/sources/remote.py index a6b02fd1c..562a8f226 100644 --- a/buildstream/plugins/sources/remote.py +++ b/buildstream/plugins/sources/remote.py @@ -37,7 +37,7 @@ remote - stage files from remote urls # executable: true # Specify the url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo diff --git a/buildstream/plugins/sources/tar.py b/buildstream/plugins/sources/tar.py index 195c05958..d4e30d9ba 100644 --- a/buildstream/plugins/sources/tar.py +++ b/buildstream/plugins/sources/tar.py @@ -33,7 +33,7 @@ tar - stage files from tar archives kind: tar # Specify the tar url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo.tar diff --git a/buildstream/plugins/sources/zip.py b/buildstream/plugins/sources/zip.py index f5fac3a48..03efcef79 100644 --- a/buildstream/plugins/sources/zip.py +++ b/buildstream/plugins/sources/zip.py @@ -29,7 +29,7 @@ zip - stage files from zip archives kind: zip # Specify the zip url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo.zip diff --git a/doc/source/format_project_refs.rst b/doc/source/format_project_refs.rst index 799b5e761..8dcb2448d 100644 --- a/doc/source/format_project_refs.rst +++ b/doc/source/format_project_refs.rst @@ -21,9 +21,9 @@ When a ``project.refs`` file is in use, any source references found in the :ref:`inline source declarations ` are considered invalid and will be ignored, and a warning will be emitted for them. -When ``bst track`` is run for your project, the ``project.refs`` file +When ``bst source track`` is run for your project, the ``project.refs`` file will be updated instead of the inline source declarations. In the absence -of a ``project.refs`` file, ``bst track`` will create one automatically +of a ``project.refs`` file, ``bst source track`` will create one automatically with the tracking results. An interesting property of ``project.refs`` is that it allows for diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py index 8b549e3ba..007064f89 100644 --- a/tests/frontend/completions.py +++ b/tests/frontend/completions.py @@ -160,7 +160,7 @@ def test_options(cli, cmd, word_idx, expected): ('bst show --deps b', 3, ['build ']), ('bst show --deps=b', 2, ['build ']), ('bst show --deps r', 3, ['run ']), - ('bst track --deps ', 3, ['all ', 'none ']), + ('bst source track --deps ', 4, ['all ', 'none ']), ]) def test_option_choice(cli, cmd, word_idx, expected): assert_completion(cli, cmd, word_idx, expected) -- cgit v1.2.1