~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-01 22:16:55 UTC
  • mfrom: (2499.3.1 fix-118186)
  • Revision ID: pqm@pqm.ubuntu.com-20070601221655-eeiryluirj5h73hp
Fix Workingtree4.get_file_sha1 on missing files (#118186)

Show diffs side-by-side

added added

removed removed

Lines of Context:
414
414
        file_abspath = self.abspath(path)
415
415
        state = self.current_dirstate()
416
416
        if stat_value is None:
417
 
            stat_value = os.lstat(file_abspath)
 
417
            try:
 
418
                stat_value = os.lstat(file_abspath)
 
419
            except OSError, e:
 
420
                if e.errno == errno.ENOENT:
 
421
                    return None
 
422
                else:
 
423
                    raise
418
424
        link_or_sha1 = state.update_entry(entry, file_abspath,
419
425
                                          stat_value=stat_value)
420
426
        if entry[1][0][0] == 'f':