~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_dirstate_helpers_c.pyx

Merge bzr.dev 4187, and revert the change to fix refcycle issues.

I apparently didn't run the smart fetch tests. Which show that we access inv+chk pages
as a fulltext, and then insert the stream, which expects to get the block as a compressed
block. :(.
Need to rethink how to do it, possibly with weakrefs.


This also brings in CommitBuilder.record_iter_changes() and the updates to btree_index
and backing indices.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1144
1144
                        if target_details[2] == source_details[2]:
1145
1145
                            if link_or_sha1 is None:
1146
1146
                                # Stat cache miss:
1147
 
                                file_obj = file(path_info[4], 'rb')
1148
 
                                try:
1149
 
                                    # XXX: TODO: Use lower level file IO rather
1150
 
                                    # than python objects for sha-misses.
1151
 
                                    statvalue = self.fstat(file_obj.fileno())
1152
 
                                    link_or_sha1 = self.sha_file(file_obj)
1153
 
                                finally:
1154
 
                                    file_obj.close()
 
1147
                                statvalue, link_or_sha1 = \
 
1148
                                    self.state._sha1_provider.stat_and_sha1(
 
1149
                                    path_info[4])
1155
1150
                                self.state._observed_sha1(entry, link_or_sha1,
1156
1151
                                    statvalue)
1157
1152
                            content_change = (link_or_sha1 != source_details[1])