~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-25 03:09:43 UTC
  • Revision ID: mbp@sourcefrog.net-20050325030943-e2ba06e151908aee
- clean up smart_add code, and make it commit the inventory
  when done.

  still not perfect handling of already-versioned files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
    Therefore simply saying 'bzr add .' will version all files that
173
173
    are currently unknown.
174
174
    """
175
 
    if True:
176
 
        bzrlib.add.smart_add(file_list, verbose)
177
 
    else:
178
 
        # old way
179
 
        assert file_list
180
 
        b = Branch(file_list[0], find_root=True)
181
 
        b.add([b.relpath(f) for f in file_list], verbose=verbose)
182
 
 
 
175
    bzrlib.add.smart_add(file_list, verbose)
183
176
    
184
177
 
185
178
def cmd_relpath(filename):
 
179
    """Show path of file relative to root"""
186
180
    print Branch(filename).relpath(filename)
187
181
 
188
182