/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/builtins.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-09 19:20:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6893.
  • Revision ID: jelmer@jelmer.uk-20180309192041-dplyurkboa6449wq
Avoid Tree.id2path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1128
1128
            else:
1129
1129
                # 'fix' the case of a potential 'from'
1130
1130
                from_path = tree.get_canonical_inventory_path(rel_names[0])
1131
 
                from_id = tree.path2id(from_path)
1132
1131
                if (not osutils.lexists(names_list[0]) and
1133
 
                    from_id and
1134
 
                    tree.stored_kind(from_path, from_id) == "directory"):
 
1132
                    tree.is_versioned(from_path) and
 
1133
                    tree.stored_kind(from_path) == "directory"):
1135
1134
                    into_existing = False
1136
1135
        # move/rename
1137
1136
        if into_existing:
3024
3023
    @display_command
3025
3024
    def run(self, filename):
3026
3025
        tree, relpath = WorkingTree.open_containing(filename)
3027
 
        file_id = tree.path2id(relpath)
3028
3026
        b = tree.branch
3029
3027
        self.add_cleanup(b.lock_read().unlock)
3030
 
        touching_revs = log.find_touching_revisions(b, file_id)
 
3028
        touching_revs = log.find_touching_revisions(
 
3029
                b.repository, b.last_revision(), relpath)
3031
3030
        for revno, revision_id, what in touching_revs:
3032
3031
            self.outf.write("%6d %s\n" % (revno, what))
3033
3032
 
6775
6774
    __doc__ = """Export command helps and error messages in po format."""
6776
6775
 
6777
6776
    hidden = True
6778
 
    takes_options = [Option('plugin', 
 
6777
    takes_options = [Option('plugin',
6779
6778
                            help='Export help text from named command '\
6780
6779
                                 '(defaults to all built in commands).',
6781
6780
                            type=text_type),