On Fri, Mar 23, 2012 at 03:49:32PM -0700, Raju Subramanian wrote:
> When size limit is reached in the middle of processing a dir,
> the report ends up containing oldest files. This change adds
> an optional param in the plugin to prioritize newer files.
>
> Feature #9937
> Requested-by: Ronald Lee
When size limit is reached in the middle of processing a dir,
the report ends up containing oldest files. This change adds
an optional param in the plugin to prioritize newer files.
Feature #9937
Requested-by: Ronald Lee
Signed-off-by: Raju Subramanian
---
AUTHORS |
This looks good to me, thanks. Few nits that don't effect correctness:
Unnecessary lines in try block, move this
path_entries.append((path, s))
to outside the block
>From a style nit perspective, there are a few line continuations and
indentations that seem non-standard. google style doesn't
On Fri, Mar 23, 2012 at 03:06:54PM -0700, Raju Subramanian wrote:
> When size limit is reached in the middle of processing a dir,
> the report ends up containing oldest files. This change adds
> an optional param in the plugin to prioritize newer files.
>
> Feature #9937
> Requested-by: Ronald Lee
When size limit is reached in the middle of processing a dir,
the report ends up containing oldest files. This change adds
an optional param in the plugin to prioritize newer files.
Feature #9937
Requested-by: Ronald Lee
Signed-off-by: Raju Subramanian
---
AUTHORS |
Changing to OSError.
On Fri, Mar 23, 2012 at 3:00 PM, Ben Pfaff wrote:
> On Fri, Mar 23, 2012 at 02:57:49PM -0700, Raju Subramanian wrote:
> > When size limit is reached in the middle of processing a dir,
> > the report ends up containing oldest files. This change adds
> > an optional param in t
> It looks OK to me (although "except Exception" seems a bit overbroad).
It should catch an OSError:
http://docs.python.org/library/exceptions.html#exceptions.OSError
The problem with "except Exception" is you swallow exceptions that are
indicative of bugs. If something throws an AssertionError
On Fri, Mar 23, 2012 at 02:57:49PM -0700, Raju Subramanian wrote:
> When size limit is reached in the middle of processing a dir,
> the report ends up containing oldest files. This change adds
> an optional param in the plugin to prioritize newer files.
>
> Feature #9937
> Requested-by: Ronald Lee
On Fri, Mar 23, 2012 at 02:58:24PM -0700, Raju Subramanian wrote:
> On Fri, Mar 23, 2012 at 2:39 PM, Ben Pfaff wrote:
>
> > That's fine with. Omitting such files would also be fine, I guess.
> > But the new behavior appeared, at a glance, to be that we don't catch
> > exceptions in os.stat() at
On Fri, Mar 23, 2012 at 2:39 PM, Ben Pfaff wrote:
> That's fine with. Omitting such files would also be fine, I guess.
> But the new behavior appeared, at a glance, to be that we don't catch
> exceptions in os.stat() at all. No?
>
>
No. I have added that check in the latest patch I sent.
> On
When size limit is reached in the middle of processing a dir,
the report ends up containing oldest files. This change adds
an optional param in the plugin to prioritize newer files.
Feature #9937
Requested-by: Ronald Lee
Signed-off-by: Raju Subramanian
---
AUTHORS |
That's fine with. Omitting such files would also be fine, I guess.
But the new behavior appeared, at a glance, to be that we don't catch
exceptions in os.stat() at all. No?
On Fri, Mar 23, 2012 at 02:37:21PM -0700, Raju Subramanian wrote:
> The old behaviour was if os.stat() failed, it would sti
The old behaviour was if os.stat() failed, it would still add the file to
the report but just wouldn't update the counter tracking the sizes. Do you
want to maintain this behaviour?
On Fri, Mar 23, 2012 at 2:26 PM, Ben Pfaff wrote:
> On Fri, Mar 23, 2012 at 02:22:23PM -0700, Raju Subramanian wro
>
> > +
> > +def file_output(cap, path_list, newest_first = False):
> > +"""
> > +If newest_first is True, the list of files in path_list is sorted
> > +by file modification time in descending order, else its sorted
> > +in ascending order.
> > +"""
> > if cap in entries:
>
On Fri, Mar 23, 2012 at 02:22:23PM -0700, Raju Subramanian wrote:
> When size limit is reached in the middle of processing a dir,
> the report ends up containing oldest files. This change adds
> an optional param in the plugin to prioritize newer files.
>
> Feature #9937
> Requested-by: Ronald Lee
>
>
> I think that fcmp(x,y) can just "return cmp(x[1].st_mtime, y[1].st_mtime)".
>
Removed. Implemented what Reid suggested.
> I think that the try...except around the arithmetic in file_output is
> no longer necessary.
removed.
> However, I don't think that this is safe:
> > +path_
When size limit is reached in the middle of processing a dir,
the report ends up containing oldest files. This change adds
an optional param in the plugin to prioritize newer files.
Feature #9937
Requested-by: Ronald Lee
Signed-off-by: Raju Subramanian
---
AUTHORS |
On Fri, Mar 23, 2012 at 1:43 PM, Ben Pfaff wrote:
> On Fri, Mar 23, 2012 at 01:37:53PM -0700, Raju Subramanian wrote:
> > On Fri, Mar 23, 2012 at 1:28 PM, Ben Pfaff wrote:
> >
> > > On Fri, Mar 23, 2012 at 01:22:54PM -0700, Raju Subramanian wrote:
> > > > > The tree_output function is documented
On Fri, Mar 23, 2012 at 01:37:53PM -0700, Raju Subramanian wrote:
> On Fri, Mar 23, 2012 at 1:28 PM, Ben Pfaff wrote:
>
> > On Fri, Mar 23, 2012 at 01:22:54PM -0700, Raju Subramanian wrote:
> > > > The tree_output function is documented as processing files less nested
> > > > in the directory tre
On Fri, Mar 23, 2012 at 1:28 PM, Ben Pfaff wrote:
> On Fri, Mar 23, 2012 at 01:22:54PM -0700, Raju Subramanian wrote:
> > > The tree_output function is documented as processing files less nested
> > > in the directory tree before those deeper in the directory tree. It
> > > doesn't do that anymo
On Fri, Mar 23, 2012 at 01:22:54PM -0700, Raju Subramanian wrote:
> > The tree_output function is documented as processing files less nested
> > in the directory tree before those deeper in the directory tree. It
> > doesn't do that anymore, so you should update the documentation.
> >
> >
> I don'
I am addressing the rest of the comments from you and Reid. I need more
clarification about this particular comment.
> The tree_output function is documented as processing files less nested
> in the directory tree before those deeper in the directory tree. It
> doesn't do that anymore, so you sh
Contextless notes inline
On Mar 23, 2555 BE, at 7:10, Raju Subramanian wrote:
> When size limit is reached in the middle of processing a dir,
> the report ends up containing oldest files. This change adds
> an optional param in the plugin to prioritize newer files.
>
> Feature #9937
> Requested
On Fri, Mar 23, 2012 at 07:10:20AM -0700, Raju Subramanian wrote:
> When size limit is reached in the middle of processing a dir,
> the report ends up containing oldest files. This change adds
> an optional param in the plugin to prioritize newer files.
>
> Feature #9937
> Requested-by: Ronald Lee
When size limit is reached in the middle of processing a dir,
the report ends up containing oldest files. This change adds
an optional param in the plugin to prioritize newer files.
Feature #9937
Requested-by: Ronald Lee
Signed-off-by: Raju Subramanian
---
AUTHORS |
25 matches
Mail list logo