Code review comment for lp:~rvb/maas/show-version-doc

Revision history for this message
Raphaƫl Badin (rvb) wrote :

On 04/11/2014 01:54 PM, Julian Edwards wrote:
> On Friday 11 Apr 2014 09:29:20 you wrote:
>> +# Gather information about the branch and the build date.
>> +from subprocess import check_output
>> +bzr_last_revision_number = check_output(['bzr', 'revno'])
>> +bzr_last_revision_date = check_output(['bzr', 'version-info',
>> '--template={date}','--custom']) +bzr_build_date = check_output(['bzr',
>> 'version-info', '--template={build_date}','--custom'])
>
> You know that bzr is written in Python and has an API right? :)

I know. I deliberately used the command line because:
- I don't want to add yet another dependency (even a dev one) to maas
for such a small thing.
- I tried once to use bzrlib and the doc is absolutely horrible.
Couldn't figure out how to do the simplest operations.
- If someday we move to an other tool to manage the source code (and I
hope we'll do so sooner rather than later) it will be simpler to port
this stuff if we use the command line now.

« Back to merge proposal