~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/rename_map.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-09 19:25:42 UTC
  • mto: (5777.5.1 inventoryworkingtree)
  • mto: This revision was merged to the branch mainline in revision 5781.
  • Revision ID: jelmer@samba.org-20110409192542-8bbedp36s7nj928e
Split InventoryTree out of Tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    trace,
24
24
)
25
25
from bzrlib.ui import ui_factory
26
 
from bzrlib.i18n import gettext
 
26
 
27
27
 
28
28
class RenameMap(object):
29
29
    """Determine a mapping of renames."""
65
65
        try:
66
66
            for num, (file_id, contents) in enumerate(
67
67
                tree.iter_files_bytes(desired_files)):
68
 
                task.update(gettext('Calculating hashes'), num, len(file_ids))
 
68
                task.update('Calculating hashes', num, len(file_ids))
69
69
                s = StringIO()
70
70
                s.writelines(contents)
71
71
                s.seek(0)
103
103
        task = ui_factory.nested_progress_bar()
104
104
        try:
105
105
            for num, path in enumerate(paths):
106
 
                task.update(gettext('Determining hash hits'), num, len(paths))
 
106
                task.update('Determining hash hits', num, len(paths))
107
107
                hits = self.hitcounts(self.tree.get_file_lines(None,
108
108
                                                               path=path))
109
109
                all_hits.extend((v, path, k) for k, v in hits.items())
238
238
            pp.next_phase()
239
239
            delta = rn._make_inventory_delta(matches)
240
240
            for old, new, file_id, entry in delta:
241
 
                trace.note( gettext("{0} => {1}").format(old, new) )
 
241
                trace.note("%s => %s", old, new)
242
242
            if not dry_run:
243
243
                tree.add(required_parents)
244
244
                tree.apply_inventory_delta(delta)