~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: mbp at sourcefrog
  • Date: 2005-04-01 08:22:11 UTC
  • Revision ID: mbp@sourcefrog.net-20050401082211-da0a0e8911740407
- basic support for moving files to different directories - have not done support for renaming them yet, but should be straightforward - some tests, but many cases are not handled yet i think

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
    print Branch(filename).relpath(filename)
181
181
 
182
182
 
 
183
 
183
184
def cmd_inventory(revision=None):
184
185
    """Show inventory of the current working copy."""
185
186
    ## TODO: Also optionally show a previous inventory
195
196
 
196
197
 
197
198
 
 
199
def cmd_mv(source_list, dest):
 
200
    b = Branch('.')
 
201
 
 
202
    b.rename([b.relpath(s) for s in source_list], b.relpath(dest))
 
203
 
 
204
 
 
205
 
198
206
def cmd_info():
199
207
    """info: Show statistical information for this branch
200
208
 
692
700
    'init':                   [],
693
701
    'log':                    [],
694
702
    'lookup-revision':        ['revno'],
 
703
    'mv':                     ['source$', 'dest'],
695
704
    'relpath':                ['filename'],
696
705
    'remove':                 ['file+'],
697
706
    'root':                   ['filename?'],
795
804
            else:
796
805
                argdict[argname + '_list'] = args[:]
797
806
                args = []
 
807
        elif ap[-1] == '$': # all but one
 
808
            if len(args) < 2:
 
809
                bailout("command %r needs one or more %s"
 
810
                        % (cmd, argname.upper()))
 
811
            argdict[argname + '_list'] = args[:-1]
 
812
            args[:-1] = []                
798
813
        else:
799
814
            # just a plain arg
800
815
            argname = ap