~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

[patch] Michael Ellerman: 'Trivial patch to allow revno to take a location'
Plus a test case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
    """Show current revision number.
158
158
 
159
159
    This is equal to the number of revisions on this branch."""
 
160
    takes_args = ['location?']
160
161
    @display_command
161
 
    def run(self):
162
 
        print Branch.open_containing(u'.')[0].revno()
 
162
    def run(self, location=u'.'):
 
163
        print Branch.open_containing(location)[0].revno()
163
164
 
164
165
 
165
166
class cmd_revision_info(Command):