From 7b5ce7f4b45291f9bb8b2683b9204ab656f3d72f Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 7 Sep 2005 18:10:57 +0000 Subject: [PATCH] fix line-feeds, set svn:eol-style git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@279394 13f79535-47bb-0310-9956-ffa450edef68 --- docs/svn.html | 440 +++++++++--------- .../optional/ssh/AbstractSshMessage.java | 4 +- .../taskdefs/optional/ssh/ScpFromMessage.java | 11 +- .../taskdefs/optional/ssh/ScpToMessage.java | 6 +- xdocs/svn.xml | 102 ++-- 5 files changed, 282 insertions(+), 281 deletions(-) diff --git a/docs/svn.html b/docs/svn.html index bdc754256..ca97e6f47 100644 --- a/docs/svn.html +++ b/docs/svn.html @@ -1,220 +1,220 @@ - - - - - - - - Apache Ant - SVN Repositories - - - - - - - - -
- - - - - - -
Apache Ant siteApache Ant logo -
- - - - - - - - - - - - - - -
- - - - -
- the Apache Ant site -
-
-
-
- -
- - - - - -
- - - - -
Home
-
- - - - -
Projects
-
-
- -
- - -
 
-
-
-

SVN Repositories

-

- - Access the Source Tree (Subversion) -

-

Anyone can checkout source code from our public Subversion repository. To do so, - simply use the following command (if you are using a GUI client, configure it - appropriately):

-
-svn co http://svn.apache.org/repos/asf/ant/[project]/trunk/ ant-[project]
-

Modules available for access are:

-
    -
  • ant - The "main" Ant module.
  • -
  • antlibs - Libraries developed as antlib.
  • -
  • sandbox - New developments.
  • -
-

If you are not familiar with Subversion, Jakarta's - source repositories page may hold many helpful hints.

-

Nightly snapshots of the CVS tree are available at - http://cvs.apache.org/snapshots/ant/.

- -
-
- - - - - - - - - - - - - - - + + + + + + + + Apache Ant - SVN Repositories + + + + + + + + +
+ + + + + + +
Apache Ant siteApache Ant logo +
+ + + + + + + + + + + + + + +
+ + + + +
+ the Apache Ant site +
+
+
+
+ +
+ + + + + +
+ + + + +
Home
+
+ + + + +
Projects
+
+
+ +
+ + +
 
+
+
+

SVN Repositories

+

+ + Access the Source Tree (Subversion) +

+

Anyone can checkout source code from our public Subversion repository. To do so, + simply use the following command (if you are using a GUI client, configure it + appropriately):

+
+svn co http://svn.apache.org/repos/asf/ant/[project]/trunk/ ant-[project]
+

Modules available for access are:

+
    +
  • ant - The "main" Ant module.
  • +
  • antlibs - Libraries developed as antlib.
  • +
  • sandbox - New developments.
  • +
+

If you are not familiar with Subversion, Jakarta's + source repositories page may hold many helpful hints.

+

Nightly snapshots of the CVS tree are available at + http://cvs.apache.org/snapshots/ant/.

+ +
+
+ + + + + + + + + + + + + + + diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java index dd4586365..ae676db8c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java @@ -157,7 +157,7 @@ public abstract class AbstractSshMessage { */ protected void logStats(long timeStarted, long timeEnded, - int totalLength) { + long totalLength) { double duration = (timeEnded - timeStarted) / 1000.0; NumberFormat format = NumberFormat.getNumberInstance(); format.setMaximumFractionDigits(2); @@ -184,7 +184,7 @@ public abstract class AbstractSshMessage { * @param percentTransmitted the current percent transmitted * @return the percent that the file is of the total */ - protected final int trackProgress(int filesize, int totalLength, + protected final int trackProgress(long filesize, long totalLength, int percentTransmitted) { int percent = (int) Math.round(Math.floor((totalLength diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java index cfb2494f1..8c51b2b60 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java @@ -163,7 +163,7 @@ public class ScpFromMessage extends AbstractSshMessage { int end = serverResponse.indexOf(" ", start + 1); start = end + 1; end = serverResponse.indexOf(" ", start + 1); - int filesize = Integer.parseInt(serverResponse.substring(start, end)); + long filesize = Long.parseLong(serverResponse.substring(start, end)); String filename = serverResponse.substring(end + 1); log("Receiving: " + filename + " : " + filesize); File transferFile = (localFile.isDirectory()) @@ -175,7 +175,7 @@ public class ScpFromMessage extends AbstractSshMessage { } private void fetchFile(File localFile, - int filesize, + long filesize, OutputStream out, InputStream in) throws IOException { byte[] buf = new byte[BUFFER_SIZE]; @@ -184,20 +184,21 @@ public class ScpFromMessage extends AbstractSshMessage { // read a content of lfile FileOutputStream fos = new FileOutputStream(localFile); int length; - int totalLength = 0; + long totalLength = 0; long startTime = System.currentTimeMillis(); // only track progress for files larger than 100kb in verbose mode boolean trackProgress = getVerbose() && filesize > 102400; // since filesize keeps on decreasing we have to store the // initial filesize - int initFilesize = filesize; + long initFilesize = filesize; int percentTransmitted = 0; try { while (true) { length = in.read(buf, 0, - (buf.length < filesize) ? buf.length : filesize); + (BUFFER_SIZE < filesize) ? BUFFER_SIZE + : (int) filesize); if (length < 0) { throw new EOFException("Unexpected end of stream."); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java index fd31a2c8b..68d254d03 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java @@ -197,7 +197,7 @@ public class ScpToMessage extends AbstractSshMessage { InputStream in, OutputStream out) throws IOException { // send "C0644 filesize filename", where filename should not include '/' - int filesize = (int) localFile.length(); + long filesize = localFile.length(); String command = "C0644 " + filesize + " "; command += localFile.getName(); command += "\n"; @@ -211,13 +211,13 @@ public class ScpToMessage extends AbstractSshMessage { FileInputStream fis = new FileInputStream(localFile); byte[] buf = new byte[BUFFER_SIZE]; long startTime = System.currentTimeMillis(); - int totalLength = 0; + long totalLength = 0; // only track progress for files larger than 100kb in verbose mode boolean trackProgress = getVerbose() && filesize > 102400; // since filesize keeps on decreasing we have to store the // initial filesize - int initFilesize = filesize; + long initFilesize = filesize; int percentTransmitted = 0; try { diff --git a/xdocs/svn.xml b/xdocs/svn.xml index a433bd60c..39a0abd52 100644 --- a/xdocs/svn.xml +++ b/xdocs/svn.xml @@ -1,52 +1,52 @@ - - - - - - SVN Repositories - Antoine Levy-Lambert - - - - -
- -

Anyone can checkout source code from our public Subversion repository. To do so, - simply use the following command (if you are using a GUI client, configure it - appropriately):

- - -svn co http://svn.apache.org/repos/asf/ant/[project]/trunk/ ant-[project] - -

Modules available for access are:

- -
    -
  • ant - The "main" Ant module.
  • -
  • antlibs - Libraries developed as antlib.
  • -
  • sandbox - New developments.
  • -
- -

If you are not familiar with Subversion, Jakarta's - source repositories page may hold many helpful hints.

- -

Nightly snapshots of the CVS tree are available at - http://cvs.apache.org/snapshots/ant/.

- -
- + + + + + + SVN Repositories + Antoine Levy-Lambert + + + + +
+ +

Anyone can checkout source code from our public Subversion repository. To do so, + simply use the following command (if you are using a GUI client, configure it + appropriately):

+ + +svn co http://svn.apache.org/repos/asf/ant/[project]/trunk/ ant-[project] + +

Modules available for access are:

+ +
    +
  • ant - The "main" Ant module.
  • +
  • antlibs - Libraries developed as antlib.
  • +
  • sandbox - New developments.
  • +
+ +

If you are not familiar with Subversion, Jakarta's + source repositories page may hold many helpful hints.

+ +

Nightly snapshots of the CVS tree are available at + http://cvs.apache.org/snapshots/ant/.

+ +
+
\ No newline at end of file