[MERGE] path_content_summary

Ian Clatworthy ian.clatworthy at internode.on.net
Tue Sep 25 09:00:37 BST 2007


Rob,

This all looks good (though I'm not sure if there are any cross-platform
issues once we start using it inside commit).

bb:tweak

> +    def path_content_summary(self, path, _lstat=os.lstat,
> +        _mapper=osutils.file_kind_from_stat_mode):
> +        """See Tree.path_content_summary."""
> +        abspath = self.abspath(path)
> +        try:
> +            stat_result = _lstat(abspath)
> +        except OSError, e:
> +            if getattr(e, 'errno', None) == errno.ENOENT:
> +                # no file.
> +                return ('missing', None, None, None)
> +            # propogate other errors
> +            raise

Spelling of propagate.

We have osutils.lstat that falls back to stat on Windows. I'm not sure
if you ought to be using that or not?

Ian C.



More information about the bazaar mailing list