Comment 2 for bug 527043

Revision history for this message
Adrien Saladin (adrien-saladin) wrote :

there is a command: bzr version-info. Used with the --python option, it may be a solution to this problem.
Here is an example of the output:

#!/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'ptools',
 'build_date': '2010-02-28 17:49:25 +0100',
 'clean': None,
 'date': '2010-02-27 22:54:38 +0100',
 'revision_id': '<email address hidden>',
 'revno': 426}

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

####

Is there a way to know if the working tree differs from the last commit ? Could this be the 'clean' attribute ?