Browse Source

Reflected across from 1nt1.x tree...

Rename basedir to dir and make it default to  basedir if not specified


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272117 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
6e56b4522a
2 changed files with 8 additions and 10 deletions
  1. +8
    -9
      proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java
  2. +0
    -1
      proposal/myrmidon/src/java/org/apache/antlib/cvslib/Resources.properties

+ 8
- 9
proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java View File

@@ -73,7 +73,7 @@ public class ChangeLog
private Vector m_cvsUsers = new Vector();

/** Input dir */
private File m_basedir;
private File m_dir;

/** Output file */
private File m_destfile;
@@ -98,9 +98,9 @@ public class ChangeLog
/**
* Set the base dir for cvs.
*/
public void setBasedir( final File basedir )
public void setDir( final File dir )
{
m_basedir = basedir;
m_dir = dir;
}

/**
@@ -222,7 +222,7 @@ public class ChangeLog

final ChangeLogParser parser = new ChangeLogParser( userList );
final Execute exe = new Execute();
exe.setWorkingDirectory( m_basedir );
exe.setWorkingDirectory( m_dir );
exe.setCommandline( command );
exe.setExecOutputHandler( parser );
exe.execute( getContext() );
@@ -240,20 +240,19 @@ public class ChangeLog
private void validate()
throws TaskException
{
if( null == m_basedir )
if( null == m_dir )
{
final String message = REZ.getString( "changelog.missing-basedir.error" );
throw new TaskException( message );
m_dir = getContext().getBaseDirectory();
}
if( null == m_destfile )
{
final String message = REZ.getString( "changelog.missing-destfile.error" );
throw new TaskException( message );
}
if( !m_basedir.exists() )
if( !m_dir.exists() )
{
final String message =
REZ.getString( "changelog.bad-basedir.error", m_basedir.getAbsolutePath() );
REZ.getString( "changelog.bad-basedir.error", m_dir.getAbsolutePath() );
throw new TaskException( message );
}
if( null != m_usersFile && !m_usersFile.exists() )


+ 0
- 1
proposal/myrmidon/src/java/org/apache/antlib/cvslib/Resources.properties View File

@@ -1,6 +1,5 @@
changelog.nodisplayname.error=Displayname attribute must be set for userID "{0}".
changelog.nouserid.error=Username attribute must be set.
changelog.missing-basedir.error=Basedir must be set.
changelog.missing-destfile.error=Destfile must be set.
changelog.bad-basedir.error=Cannot find base dir {0}
changelog.bad-userlist.error=Cannot find user lookup list {0}.


Loading…
Cancel
Save