~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_dirstate_helpers_pyx.pyx

  • Committer: Robert Collins
  • Date: 2010-05-20 02:57:52 UTC
  • mfrom: (4797.43.11 2.1)
  • mto: This revision was merged to the branch mainline in revision 5243.
  • Revision ID: robertc@robertcollins.net-20100520025752-dbfi4kx7y4ivtiff
Merge up from 2.0/2.1:

* Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex.
  (John Arbash Meinel, #582656)

* ``bzr clean-tree`` should not delete nested bzrdirs. Required for proper
  support of bzr-externals and scmproj plugins.
  (Alexander Belchenko, bug #572098)

* Reduce peak memory by one copy of compressed text.
  (John Arbash Meinel, #566940)

* Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex.
  (John Arbash Meinel, #582656)

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):