[MERGE] Fix one cause of poor commit performance with thousands of deleted paths

Robert Collins robertc at robertcollins.net
Tue Nov 27 01:53:35 GMT 2007


On Fri, 2007-10-26 at 01:09 -0400, Martin Pool wrote:
> 
> 
> > +                else:
> > +                    deleted_dict = None
> > +                if deleted_dict is not None:
> > +                    # the path has a deleted parent, do not add it.
> > +                    continue
> >              content_summary =
> self.work_tree.path_content_summary(path)
> > +            # Note that when a filter of specific files is given,
> we must only
> > +            # skip/record deleted files matching that filter.
> >              if not specific_files or is_inside_any(specific_files,
> path):
> >                  if content_summary[0] == 'missing':
> > -                    deleted_paths.add(path)
> > +                    if not deleted_paths:
> > +                        # path won't have been split yet.
> > +                        path_segments = splitpath(path)
> 
> I'd suggest you instead set path_segments=None at the top of the for
> loop,
> and check for that here.

That looks more like double handling to me. I've done the rest of the
changes you asked for.

Thanks,
Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071127/4948c3c8/attachment.pgp 


More information about the bazaar mailing list