~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-05 13:46:36 UTC
  • Revision ID: mbp@sourcefrog.net-20050405134635-488e04a5092ce0faec0ff181
- New 'move' command; now separated out from rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
 
197
197
 
198
198
 
199
 
def cmd_mv(source_list, dest):
 
199
# TODO: Maybe a 'mv' command that has the combined move/rename
 
200
# special behaviour of Unix?
 
201
 
 
202
def cmd_move(source_list, dest):
200
203
    b = Branch('.')
201
204
 
202
 
    b.rename([b.relpath(s) for s in source_list], b.relpath(dest))
 
205
    b.move([b.relpath(s) for s in source_list], b.relpath(dest))
203
206
 
204
207
 
205
208
 
747
750
    'init':                   [],
748
751
    'log':                    [],
749
752
    'lookup-revision':        ['revno'],
750
 
    'mv':                     ['source$', 'dest'],
 
753
    'move':                   ['source$', 'dest'],
751
754
    'relpath':                ['filename'],
752
755
    'remove':                 ['file+'],
753
756
    'rename':                 ['from_name', 'to_name'],