~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-22 06:55:17 UTC
  • Revision ID: mbp@sourcefrog.net-20050322065517-994757f662afb161
- new find_branch_root function; based on suggestion from aaron
  but cleaned up a bit and should work on non-unix systems
- new find-branch-root command to exercise it
- Branch constructor does this by default

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
 
369
369
 
370
370
 
 
371
def cmd_find_branch_root(filename=None):
 
372
    print bzrlib.branch.find_branch_root(filename)
 
373
    
 
374
 
371
375
def cmd_log(timezone='original'):
372
376
    """Show log of this branch.
373
377
 
587
591
    'commit':                 [],
588
592
    'diff':                   [],
589
593
    'file-id':                ['filename'],
 
594
    'find-branch-root':       ['filename?'],
590
595
    'get-file-text':          ['text_id'],
591
596
    'get-inventory':          ['inventory_id'],
592
597
    'get-revision':           ['revision_id'],
681
686
    # TODO: Need a way to express 'cp SRC... DEST', where it matches
682
687
    # all but one.
683
688
 
 
689
    # step through args and argform, allowing appropriate 0-many matches
684
690
    for ap in argform:
685
691
        argname = ap[:-1]
686
692
        if ap[-1] == '?':
687
 
            assert 0
 
693
            if args:
 
694
                argdict[argname] = args.pop(0)
688
695
        elif ap[-1] == '*':
689
696
            assert 0
690
697
        elif ap[-1] == '+':