~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-09 08:27:49 UTC
  • Revision ID: mbp@sourcefrog.net-20050509082749-22b1a6f4af329f7b
- bzr log and bzr root now accept an http URL
- new RemoteBranch.relpath()
- new find_branch factory method

Show diffs side-by-side

added added

removed removed

Lines of Context:
409
409
    takes_args = ['filename?']
410
410
    def run(self, filename=None):
411
411
        """Print the branch root."""
412
 
        print bzrlib.branch.find_branch_root(filename)
413
 
 
 
412
        from branch import find_branch
 
413
        b = find_branch(filename)
 
414
        print getattr(b, 'base', None) or getattr(b, 'baseurl')
414
415
 
415
416
 
416
417
class cmd_log(Command):
423
424
    takes_args = ['filename?']
424
425
    takes_options = ['timezone', 'verbose', 'show-ids']
425
426
    def run(self, filename=None, timezone='original', verbose=False, show_ids=False):
426
 
        b = Branch((filename or '.'), lock_mode='r')
 
427
        from branch import find_branch
 
428
        b = find_branch((filename or '.'), lock_mode='r')
427
429
        if filename:
428
430
            filename = b.relpath(filename)
429
431
        bzrlib.show_log(b, filename,