version-info --python doesn't match version-info

Bug #569934 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned
Bazaar Subversion Plugin
Triaged
Wishlist
Unassigned

Bug Description

$ bzr version-info
revision-id: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:trunk:2178
date: 2010-04-12 18:54:13 +0000
svn-revno: 2178
svn-uuid: 4407c894-4637-0410-b4f5-ada5f102cad1
build-date: 2010-04-25 22:47:54 +0100
revno: 1512
branch-nick: trunk
$ bzr version-info --python
#!/usr/bin/env python
"""This file is automatically generated by generate_version_info
It uses the current working tree to determine the revision.
So don't edit it. :)
"""

version_info = {'branch_nick': u'trunk',
 'build_date': '2010-04-25 22:48:02 +0100',
 'clean': None,
 'date': '2010-04-12 18:54:13 +0000',
 'revision_id': 'svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:trunk:2178',
 'revno': 1512}

revisions = {}

file_revisions = {}

if __name__ == '__main__':
    print 'revision: %(revno)d' % version_info
    print 'nick: %(branch_nick)s' % version_info
    print 'revision id: %(revision_id)s' % version_info

Note that svn version-info tags are missing from the python formatter.

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 569934] [NEW] version-info --python doesn't match version-info

On Sun, 2010-04-25 at 21:57 +0000, Dmitrijs Ledkovs wrote:
> Public bug reported:
>
> $ bzr version-info
> revision-id: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:trunk:2178
> date: 2010-04-12 18:54:13 +0000
> svn-revno: 2178
> svn-uuid: 4407c894-4637-0410-b4f5-ada5f102cad1
> build-date: 2010-04-25 22:47:54 +0100
> revno: 1512
> branch-nick: trunk
> $ bzr version-info --python
> #!/usr/bin/env python
> """This file is automatically generated by generate_version_info
> It uses the current working tree to determine the revision.
> So don't edit it. :)
> """
>
> version_info = {'branch_nick': u'trunk',
> 'build_date': '2010-04-25 22:48:02 +0100',
> 'clean': None,
> 'date': '2010-04-12 18:54:13 +0000',
> 'revision_id': 'svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:trunk:2178',
> 'revno': 1512}
>
> revisions = {}
>
> file_revisions = {}
>
>
> if __name__ == '__main__':
> print 'revision: %(revno)d' % version_info
> print 'nick: %(branch_nick)s' % version_info
> print 'revision id: %(revision_id)s' % version_info
>
>
> Note that svn version-info tags are missing from the python formatter.
That's true, but I don't see otherwise how the two don't match. Or do
you consider the latter the bug?

Cheers,

Jelmer

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Made a branch to fix this =)

$ bzr version-info --python > bla.py

$ bzr version-info
revision-id: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:trunk:2178
date: 2010-04-12 18:54:13 +0000
svn-revno: 2178
svn-uuid: 4407c894-4637-0410-b4f5-ada5f102cad1
build-date: 2010-04-26 01:49:14 +0100
revno: 1512
branch-nick: trunk

$ python bla.py
revno: 1512
svn-revno: 2178
branch-nick: trunk
svn-uuid: 4407c894-4637-0410-b4f5-ada5f102cad1
date: 2010-04-12 18:54:13 +0000
build-date: 2010-04-26 01:49:08 +0100
revision-id: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:trunk:2178

$ cat bla.py
#!/usr/bin/env python
"""This file is automatically generated by generate_version_info
It uses the current working tree to determine the revision.
So do not edit it. :)
"""

version_info = {'branch-nick': u'trunk',
 'build-date': u'2010-04-26 01:49:08 +0100',
 'date': u'2010-04-12 18:54:13 +0000',
 'revision-id': u'svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:trunk:2178',
 'revno': u'1512',
 'svn-revno': u'2178',
 'svn-uuid': u'4407c894-4637-0410-b4f5-ada5f102cad1'}

revisions = {}

file_revisions = {}

if __name__ == '__main__':

    for key in version_info:
        print key + ': ' + version_info[key]

tags: added: patch
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 569934] [NEW] version-info --python doesn't match version-info

>> Note that svn version-info tags are missing from the python formatter.
> That's true, but I don't see otherwise how the two don't match. Or do
> you consider the latter the bug?
>

I mean the bug is that python formatter doesn't pick up any tags added
via RioFormatter hook. Hence the information you could get from $ bzr
version-info --rio is not available when you access it via $ bzr
version-info --python. I believe you should get same/all information
you can via all formatters.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 569934] [NEW] version-info --python doesn't match version-info

On Mon, 2010-04-26 at 13:43 +0000, Dmitrijs Ledkovs wrote:
> >> Note that svn version-info tags are missing from the python formatter.
> > That's true, but I don't see otherwise how the two don't match. Or do
> > you consider the latter the bug?
> >
>
> I mean the bug is that python formatter doesn't pick up any tags added
> via RioFormatter hook. Hence the information you could get from $ bzr
> version-info --rio is not available when you access it via $ bzr
> version-info --python. I believe you should get same/all information
> you can via all formatters.
It works that way intentionally. The RioFormatter hooks is specifically
for that - the RioFormatter.

I don't think this is a bug but rather a wishlist item; the fix is
either to have both use the same hook (and rename that hook to not be
specific to Rio) or to add a different hook for the python formatter.

I'm not convinced they should be using the same values. It might make
more sense to generate proper Python values for the python formatter
rather than plain strings as are used for the rio formatter.

Cheers,

Jelmer

Andrew Bennetts (spiv)
Changed in bzr:
assignee: nobody → Dmitrijs Ledkovs (dmitrij.ledkov)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
John A Meinel (jameinel) wrote :

Last comment on patch was from 8 months ago. Knocking this back to "confirmed with incomplete patch" status.

Changed in bzr:
assignee: Dmitrijs Ledkovs (dmitrij.ledkov) → nobody
status: In Progress → Confirmed
tags: added: patch-needswork
removed: patch
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: New → Triaged
importance: Undecided → Wishlist
Changed in bzr:
importance: Medium → Wishlist
tags: added: version-info
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.