~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Robert Collins
  • Date: 2006-06-11 12:46:43 UTC
  • mto: (1767.2.2 integration)
  • mto: This revision was merged to the branch mainline in revision 1769.
  • Revision ID: robertc@robertcollins.net-20060611124643-d5e6433efe455058
Consolidate writes of adds to one write per file - drops encoding overhead by 1/3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        if should_print is not None:
64
64
            self.should_print = should_print
65
65
 
66
 
    def __call__(self, inv, parent_ie, path, kind):
 
66
    def __call__(self, inv, parent_ie, path, kind, _quote=bzrlib.osutils.quotefn):
67
67
        """Add path to inventory.
68
68
 
69
69
        The default action does nothing.
74
74
        """
75
75
        if not self.should_print:
76
76
            return
77
 
        self._to_file.write('added ')
78
 
        self._to_file.write(bzrlib.osutils.quotefn(path.raw_path))
79
 
        self._to_file.write('\n')
 
77
        self._to_file.write('added %s\n' % _quote(path.raw_path))
80
78
 
81
79
 
82
80
# TODO: jam 20050105 These could be used for compatibility