~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-12-10 08:28:22 UTC
  • mfrom: (3889.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20081210082822-li6ku9s3k63kjrpr
support -d in revision-info (Michael Hudson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
392
392
    """
393
393
    hidden = True
394
394
    takes_args = ['revision_info*']
395
 
    takes_options = ['revision']
 
395
    takes_options = [
 
396
        'revision',
 
397
        Option('directory',
 
398
            help='Branch to examine, '
 
399
                 'rather than the one containing the working directory.',
 
400
            short_name='d',
 
401
            type=unicode,
 
402
            ),
 
403
        ]
396
404
 
397
405
    @display_command
398
 
    def run(self, revision=None, revision_info_list=[]):
 
406
    def run(self, revision=None, directory=u'.', revision_info_list=[]):
399
407
 
400
408
        revs = []
401
409
        if revision is not None:
404
412
            for rev in revision_info_list:
405
413
                revs.append(RevisionSpec.from_string(rev))
406
414
 
407
 
        b = Branch.open_containing(u'.')[0]
 
415
        b = Branch.open_containing(directory)[0]
408
416
 
409
417
        if len(revs) == 0:
410
418
            revs.append(RevisionSpec.from_string('-1'))