/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 bzrlib/workingtree_4.py

  • Committer: Robert Collins
  • Date: 2007-11-05 19:40:28 UTC
  • mfrom: (2963 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2967.
  • Revision ID: robertc@robertcollins.net-20071105194028-5gc6rdajk96maaq1
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1098
1098
        :param path: The path.
1099
1099
        :param stat_result: The stat result being looked up.
1100
1100
        """
1101
 
        state = self.current_dirstate()
1102
 
        # XXX: should we make the path be passed in as utf8 ?
1103
 
        entry = state._get_entry(0, path_utf8=cache_utf8.encode(path))
1104
 
        tree_details = entry[1][0]
1105
 
        packed_stat = dirstate.pack_stat(stat_result)
1106
 
        if tree_details[4] == packed_stat:
1107
 
            return tree_details[1]
1108
 
        else:
1109
 
            return None
 
1101
        return self.current_dirstate().sha1_from_stat(path, stat_result)
1110
1102
 
1111
1103
    @needs_read_lock
1112
1104
    def supports_tree_reference(self):
1189
1181
                    # Mark this file id as having been removed
1190
1182
                    entry = block[1][entry_index]
1191
1183
                    ids_to_unversion.discard(entry[0][2])
1192
 
                    if (entry[1][0][0] == 'a'
 
1184
                    if (entry[1][0][0] in 'ar' # don't remove absent or renamed
 
1185
                                               # entries
1193
1186
                        or not state._make_absent(entry)):
1194
1187
                        entry_index += 1
1195
1188
                # go to the next block. (At the moment we dont delete empty