~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-08-29 04:08:37 UTC
  • Revision ID: mbp@sourcefrog.net-20050829040836-8899ef8fc457b043
- Branch.add shouldn't write to stdout either

Show diffs side-by-side

added added

removed removed

Lines of Context:
414
414
                         """Inventory for the working copy.""")
415
415
 
416
416
 
417
 
    def add(self, files, verbose=False, ids=None):
 
417
    def add(self, files, ids=None):
418
418
        """Make files versioned.
419
419
 
420
 
        Note that the command line normally calls smart_add instead.
 
420
        Note that the command line normally calls smart_add instead,
 
421
        which can automatically recurse.
421
422
 
422
423
        This puts the files in the Added state, so that they will be
423
424
        recorded by the next commit.
433
434
        TODO: Perhaps have an option to add the ids even if the files do
434
435
              not (yet) exist.
435
436
 
436
 
        TODO: Perhaps return the ids of the files?  But then again it
437
 
              is easy to retrieve them if they're needed.
438
 
 
439
 
        TODO: Adding a directory should optionally recurse down and
440
 
              add all non-ignored children.  Perhaps do that in a
441
 
              higher-level method.
 
437
        TODO: Perhaps yield the ids and paths as they're added.
442
438
        """
443
439
        # TODO: Re-adding a file that is removed in the working copy
444
440
        # should probably put it back with the previous ID.
480
476
                    file_id = gen_file_id(f)
481
477
                inv.add_path(f, kind=kind, file_id=file_id)
482
478
 
483
 
                if verbose:
484
 
                    print 'added', quotefn(f)
485
 
 
486
479
                mutter("add file %s file_id:{%s} kind=%r" % (f, file_id, kind))
487
480
 
488
481
            self._write_inventory(inv)