~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_add.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-06 15:59:43 UTC
  • mfrom: (2309.4.14 unicode_id_warnings)
  • Revision ID: pqm@pqm.ubuntu.com-20070306155943-73eafa9adb83ea73
(John Arbash Meinel) Change safe_*_id to issue a deprecation warning, and clean up places that were still generating unicode ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
    def __call__(self, inv, parent_ie, path, kind):
155
155
        # The first part just logs if appropriate
156
156
        # Now generate a custom id
157
 
        file_id = kind + '-' + path.raw_path.replace('/', '%')
 
157
        file_id = osutils.safe_file_id(kind + '-'
 
158
                                       + path.raw_path.replace('/', '%'),
 
159
                                       warn=False)
158
160
        if self.should_print:
159
 
            self._to_file.write('added %s with id %s\n' 
 
161
            self._to_file.write('added %s with id %s\n'
160
162
                                % (path.raw_path, file_id))
161
163
        return file_id
162
164