abderrahim commented on code in PR #87:
URL: 
https://github.com/apache/buildstream-plugins/pull/87#discussion_r2072435969


##########
src/buildstream_plugins/sources/bzr.py:
##########
@@ -53,17 +53,37 @@
    # revision number to the one on the tip of the branch specified in 'track'.
    ref: 6622
 
+   # Specify the version to be reported as the *guess_version* when reporting
+   # SourceInfo
+   #
+   # Since 2.5
+   #
+   version: 1.2
+
 See `built-in functionality doumentation
 
<https://docs.buildstream.build/master/buildstream.source.html#core-source-builtins>`_
 for
 details on common configuration options for sources.
+
+
+Reporting `SourceInfo 
<https://docs.buildstream.build/master/buildstream.source.html#buildstream.source.SourceInfo>`_
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The bzr source reports the URL of the bzr repository as the *url*.
+
+Further, the bzr source reports the ``SourceInfoMedium.BZR`` *medium* and
+the ``SourceVersionType.COMMIT`` *version_type*, for which it reports the bzr 
revision
+number as the *version*.
+
+Since the bzr source does not have a way to know what the release version
+corresponds to the revision number, the bzr source exposes the ``version`` 
configuration
+attribute to allow explicit specification of the *guess_version*.
 """
 
 import os
 import shutil
 import fcntl
 from contextlib import contextmanager
 
-from buildstream import Source, SourceError
+from buildstream import Source, SourceError, SourceInfoMedium, 
SourceVersionType

Review Comment:
   Yeah that works too. We should add the dependency in the 
pyproject.toml/setup.py/whatever.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to