You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jason Rosenberg <ja...@squaretrade.com> on 2001/01/19 08:50:56 UTC

What I did to Delete.java

In Delete.java, when explicitly deleting a directory with verbose mode, 
you get double reporting of the "Deleting" message:

Deleting directory /foo/bar/
Deleting directory /foo/bar/

This is because the message is logged always in the execute() method,
and then again within the removeDir() method, for verbose mode.

So, I commented out the log message in execute():

        // delete the directory
        if (dir != null && dir.exists() && dir.isDirectory() && !usedMatchingTask) {
        // don't need this, the same message is logged below in removeDir  --jason
            //log("Deleting directory " + dir.getAbsolutePath());
            removeDir(dir);
        }

And changed the logging in the removeDir() method to always happen, instead
of just for verbose mode:

        // log this normally, not only in verbose mode  --jason
        // log("Deleting directory " + d.getAbsolutePath(), verbosity);
        log("Deleting directory " + d.getAbsolutePath());

 
The double reporting is especially noticeable when you are deleting
an empty directory.

I am using the 1.2 source distribution, as a starting point.

Jason

Re: What I did to Delete.java

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Jason,

From: "Jason Rosenberg" <ja...@squaretrade.com>
> I would, but I haven't been properly indocrinated, etc.

You can indoctrinate yourself. Start here,
http://jakarta.apache.org/site/getinvolved.html, for a general idea and
look here, http://jakarta.apache.org/site/source.html, for particulars on
patches. If you have any questions, let us know.

> But I would strongly urge against accepting me into the fold
> of committers, etc., because you would have to live with me
> constantly submitting new flow control scripting oriented tasks,
> and I don't think you are willing to give me that voice....

Whatever lights your candle :-)

Conor




Re: What I did to Delete.java

Posted by Jason Rosenberg <ja...@squaretrade.com>.
I would, but I haven't been properly indocrinated, etc.

Plus, I don't really have a sense yet of what people consider
useful versus them being my own, personal scratched itches.

Anyway, please point me to the place where I learn about the
proper format for submitting patches, etc.

But I would strongly urge against accepting me into the fold
of committers, etc., because you would have to live with me
constantly submitting new flow control scripting oriented tasks,
and I don't think you are willing to give me that voice....

Jason

----- Original Message ----- 
From: "Conor MacNeill" <co...@cortexebusiness.com.au>
To: <an...@jakarta.apache.org>
Sent: Friday, January 19, 2001 9:24 AM
Subject: Re: What I did to Delete.java


> Jason,
> 
> you wouldn't consider submitting patches with a [PATCH] subject line and
> using cvs diff, would you? :-)
> 
> Conor
> 
> 
> ----- Original Message -----
> From: "Jason Rosenberg" <ja...@squaretrade.com>
> To: <an...@jakarta.apache.org>
> Sent: Friday, January 19, 2001 6:50 PM
> Subject: What I did to Delete.java
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org
> 


Code freeze (Was Re: What I did to Delete.java)

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Bill,
----- Original Message -----
From: "Bill Brooks" <wb...@lug.ee.calpoly.edu>
>
> Are you still accepting patches before the 1.3 release? New tasks? How
> long do we have to sumbit things before the code freeze?
>

The details of the release plan are contained in another post
http://marc.theaimsgroup.com/?l=ant-dev&m=97990321207133&w=2

As it says there, new features & tasks, patches, bug fixes, etc will be
considered until Feb 5. Of course, any committer may veto a patch or a
commit, perhaps to suggest it be deferred till after the release. In other
words, IMHO, it would be acceptable to -1 something, giving the reason that
inclusion of the patch, so close to a release, would risk introducing bugs,
etc. Conversely, we could vote to delay the release to include an important
change. I don't think we want to become slaves to the release plan. If it
needs to change, it should be changed.

I would also note that submitting a patch before Feb 5th does not guarantee
its inclusion in the release, since there may be no committer who has
enough time to fully consider the patch.

Conor





Re: What I did to Delete.java

Posted by Bill Brooks <wb...@lug.ee.calpoly.edu>.
On Sat, 20 Jan 2001, Conor MacNeill wrote:

> Jason,
> 
> you wouldn't consider submitting patches with a [PATCH] subject line and
> using cvs diff, would you? :-)
 
Conor,

Are you still accepting patches before the 1.3 release? New tasks? How
long do we have to sumbit things before the code freeze? 

Bill



Re: What I did to Delete.java

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Jason,

you wouldn't consider submitting patches with a [PATCH] subject line and
using cvs diff, would you? :-)

Conor


----- Original Message -----
From: "Jason Rosenberg" <ja...@squaretrade.com>
To: <an...@jakarta.apache.org>
Sent: Friday, January 19, 2001 6:50 PM
Subject: What I did to Delete.java





Re: What I did to Delete.java

Posted by Jason Rosenberg <ja...@squaretrade.com>.
Glenn,

I agree with both you and Stefan.  Since I am generally
instantiating my Delete objects directly via javascript,
and always calling setVerbose on the object, I hadn't
properly considered all the effects of what happens
in non-verbose mode.

I would be greatful if you check in a fix.

Thanks,

Jason

----- Original Message ----- 
From: "Glenn McAllister" <gl...@somanetworks.com>
To: <an...@jakarta.apache.org>
Sent: Friday, January 19, 2001 9:23 AM
Subject: Re: What I did to Delete.java


> Stefan Bodewig wrote:
> 
> > > And changed the logging in the removeDir() method to always happen,
> > > instead of just for verbose mode:
> >
> > I'm not sure I'd want that much output - this is going to print a line
> > for every single directory out of a big directory tree. IMHO this
> > should be left to verbose reporting.
> 
> I'm inclined to agree.  My suggestion is that if the "verbosity" is
> VERBOSE, skip the first message and let the removeDir method do all the
> logging.
> 
> I'm happy to fix this, but I'm going to follow Sam's lead on this one.
> :-) Anyone have any objections before I do this?
> 
> Glenn McAllister.
> 


Re: What I did to Delete.java

Posted by Glenn McAllister <gl...@somanetworks.com>.
Stefan Bodewig wrote:

> > And changed the logging in the removeDir() method to always happen,
> > instead of just for verbose mode:
>
> I'm not sure I'd want that much output - this is going to print a line
> for every single directory out of a big directory tree. IMHO this
> should be left to verbose reporting.

I'm inclined to agree.  My suggestion is that if the "verbosity" is
VERBOSE, skip the first message and let the removeDir method do all the
logging.

I'm happy to fix this, but I'm going to follow Sam's lead on this one.
:-) Anyone have any objections before I do this?

Glenn McAllister.

Re: [BUG] What I did to Delete.java and what you didn't ;-)

Posted by Glenn McAllister <gl...@somanetworks.com>.
> > Because you seem to be working on this at this moment, I'm not
> > fixing it myself.
>
> I thought Glenn was 8-)
>

I am. :-)

I've fixed the message issue.  I've also fixed the bug with the quiet flag.
The logic was right, just in the wrong order. :-)  If quiet=true (!quiet
&& !d.delete()) expression resolves to false *before* trying the delete, so
the delete never happens.

Once ssh and cvs are back up and running, I'll check in the fix.

Glenn McAllister


RE: [BUG] What I did to Delete.java and what you didn't ;-)

Posted by Martin van den Bemt <mv...@mvdb.com>.
I'll check out the latest version tonight and see if the problem still
exists (maby it's solved by accident) If the bug is still there, I'll fix
it...

Mvgr,
Martin

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Monday, January 22, 2001 9:49 AM
To: ant-dev@jakarta.apache.org
Subject: Re: [BUG] What I did to Delete.java and what you didn't ;-)


Martin van den Bemt <mv...@mvdb.com> wrote:

> Because you seem to be working on this at this moment, I'm not
> fixing it myself.

I thought Glenn was 8-)

Anyway, I don't think I'll find time to look into your issues today,
so if you know how to fix the bug, feel free to send a patch anyway.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org



Re: [BUG] What I did to Delete.java and what you didn't ;-)

Posted by Stefan Bodewig <bo...@apache.org>.
Martin van den Bemt <mv...@mvdb.com> wrote:

> Because you seem to be working on this at this moment, I'm not
> fixing it myself.

I thought Glenn was 8-)

Anyway, I don't think I'll find time to look into your issues today,
so if you know how to fix the bug, feel free to send a patch anyway.

Stefan

[BUG] What I did to Delete.java and what you didn't ;-)

Posted by Martin van den Bemt <mv...@mvdb.com>.
Stefan,

When testing my new stuff (chmod, chown, chgrp and chrights), I came across
a bug. Because you seem to be working on this at this moment, I'm not fixing
it myself.
When you set the quiet attribute to true, if doesn't delete the directory.
If I don't touch it (default is false anyawy) I don't get the "documented'
exceptions when the directory doesn't exist....

Mvgr,
Martin van den Bemt
mvdb@mvdb.com

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Friday, January 19, 2001 9:35 AM
To: ant-dev@jakarta.apache.org
Subject: Re: What I did to Delete.java


Jason Rosenberg <ja...@squaretrade.com> wrote:

> In Delete.java, when explicitly deleting a directory with verbose
> mode, you get double reporting of the "Deleting" message:
>
> Deleting directory /foo/bar/
> Deleting directory /foo/bar/

OK, this is annoying and should be addressed.

<snip/>

> And changed the logging in the removeDir() method to always happen,
> instead of just for verbose mode:

I'm not sure I'd want that much output - this is going to print a line
for every single directory out of a big directory tree. IMHO this
should be left to verbose reporting.

Others?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org



Re: What I did to Delete.java

Posted by Stefan Bodewig <bo...@apache.org>.
Jason Rosenberg <ja...@squaretrade.com> wrote:

> In Delete.java, when explicitly deleting a directory with verbose
> mode, you get double reporting of the "Deleting" message:
> 
> Deleting directory /foo/bar/
> Deleting directory /foo/bar/

OK, this is annoying and should be addressed.

<snip/>

> And changed the logging in the removeDir() method to always happen,
> instead of just for verbose mode:

I'm not sure I'd want that much output - this is going to print a line
for every single directory out of a big directory tree. IMHO this
should be left to verbose reporting. 

Others?

Stefan