~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2008-07-30 09:50:22 UTC
  • mto: This revision was merged to the branch mainline in revision 3596.
  • Revision ID: robertc@robertcollins.net-20080730095022-4tc7ij34c0tmejb5
 * Deleting directories by hand before running ``bzr rm`` will not
   cause subsequent errors in ``bzr st`` and ``bzr commit``.
   (Robert Collins, #150438)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1859
1859
            # Recurse directory and add all files
1860
1860
            # so we can check if they have changed.
1861
1861
            for parent_info, file_infos in\
1862
 
                osutils.walkdirs(self.abspath(directory),
1863
 
                    directory):
1864
 
                for relpath, basename, kind, lstat, abspath in file_infos:
 
1862
                self.walkdirs(directory):
 
1863
                for relpath, basename, kind, lstat, fileid, kind in file_infos:
1865
1864
                    # Is it versioned or ignored?
1866
1865
                    if self.path2id(relpath) or self.is_ignored(relpath):
1867
1866
                        # Add nested content for deletion.
1877
1876
            filename = self.relpath(abspath)
1878
1877
            if len(filename) > 0:
1879
1878
                new_files.add(filename)
1880
 
                if osutils.isdir(abspath):
1881
 
                    recurse_directory_to_add_files(filename)
 
1879
                recurse_directory_to_add_files(filename)
1882
1880
 
1883
1881
        files = list(new_files)
1884
1882
 
2418
2416
                relroot = ""
2419
2417
            # FIXME: stash the node in pending
2420
2418
            entry = inv[top_id]
2421
 
            for name, child in entry.sorted_children():
2422
 
                dirblock.append((relroot + name, name, child.kind, None,
2423
 
                    child.file_id, child.kind
2424
 
                    ))
 
2419
            if entry.kind == 'directory':
 
2420
                for name, child in entry.sorted_children():
 
2421
                    dirblock.append((relroot + name, name, child.kind, None,
 
2422
                        child.file_id, child.kind
 
2423
                        ))
2425
2424
            yield (currentdir[0], entry.file_id), dirblock
2426
2425
            # push the user specified dirs from dirblock
2427
2426
            for dir in reversed(dirblock):