~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_dirstate_helpers_pyx.pyx

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-20 09:27:48 UTC
  • mfrom: (5241.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20100520092748-oa7knubtqio8l2rc
(lifeless) Merge 2.1 into trunk with a number of fixes including pyrex 0.9.9
 support. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1219
1219
            else:
1220
1220
                try:
1221
1221
                    source_parent_id = self.old_dirname_to_file_id[old_dirname]
1222
 
                except KeyError:
 
1222
                except KeyError, _:
1223
1223
                    source_parent_entry = self.state._get_entry(self.source_index,
1224
1224
                                                           path_utf8=old_dirname)
1225
1225
                    source_parent_id = source_parent_entry[0][2]
1236
1236
            else:
1237
1237
                try:
1238
1238
                    target_parent_id = self.new_dirname_to_file_id[new_dirname]
1239
 
                except KeyError:
 
1239
                except KeyError, _:
1240
1240
                    # TODO: We don't always need to do the lookup, because the
1241
1241
                    #       parent entry will be the same as the source entry.
1242
1242
                    target_parent_entry = self.state._get_entry(self.target_index,
1478
1478
            # interface doesn't require it.
1479
1479
            try:
1480
1480
                self.current_root = self.search_specific_files.pop()
1481
 
            except KeyError:
 
1481
            except KeyError, _:
1482
1482
                raise StopIteration()
1483
1483
            self.searched_specific_files.add(self.current_root)
1484
1484
            # process the entries for this containing directory: the rest will be
1567
1567
                        #            and e.winerror == ERROR_DIRECTORY
1568
1568
                        try:
1569
1569
                            e_winerror = e.winerror
1570
 
                        except AttributeError:
 
1570
                        except AttributeError, _:
1571
1571
                            e_winerror = None
1572
1572
                        win_errors = (ERROR_DIRECTORY, ERROR_PATH_NOT_FOUND)
1573
1573
                        if (e.errno in win_errors or e_winerror in win_errors):
1656
1656
                    try:
1657
1657
                        self.current_dir_info = self.dir_iterator.next()
1658
1658
                        self.current_dir_list = self.current_dir_info[1]
1659
 
                    except StopIteration:
 
1659
                    except StopIteration, _:
1660
1660
                        self.current_dir_info = None
1661
1661
                else: #(dircmp > 0)
1662
1662
                    # We have a dirblock entry for this location, but there
1803
1803
                                and stat.S_IEXEC & current_path_info[3].st_mode)
1804
1804
                            try:
1805
1805
                                relpath_unicode = self.utf8_decode(current_path_info[0])[0]
1806
 
                            except UnicodeDecodeError:
 
1806
                            except UnicodeDecodeError, _:
1807
1807
                                raise errors.BadFilenameEncoding(
1808
1808
                                    current_path_info[0], osutils._fs_enc)
1809
1809
                            if changed is not None:
1851
1851
                try:
1852
1852
                    self.current_dir_info = self.dir_iterator.next()
1853
1853
                    self.current_dir_list = self.current_dir_info[1]
1854
 
                except StopIteration:
 
1854
                except StopIteration, _:
1855
1855
                    self.current_dir_info = None
1856
1856
 
1857
1857
    cdef object _next_consistent_entries(self):