/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/_dirstate_helpers_c.pyx

  • Committer: Robert Collins
  • Date: 2009-05-23 20:57:12 UTC
  • mfrom: (4371 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090523205712-lcwbfqk6vwavinuv
MergeĀ .dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Helper functions for DirState.
18
18
 
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])