Changeset 1201


Ignore:
Timestamp:
Jul 11, 2011, 7:53:18 PM (6 years ago)
Author:
stefan
Message:

limit number of file updates/deletes/creations shown in the svn commit to 30

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/jlatexeditor/tools/SVN.java

    r996 r1201  
    7272    StringBuilder builder = new StringBuilder();
    7373
     74    int linesCount = 0;
     75
    7476    BufferedReader in = new BufferedReader(new InputStreamReader(svn.getInputStream()), 100000);
    7577    try {
    7678      String line, lastLine = null;
    7779      while ((line = in.readLine()) != null) {
    78         if (line.startsWith("svn:")) {
    79           builder.append("<font color=red><b>" + line + "</b></font><br>");
    80         } else {
    81           builder.append(line + "<br>");
    82         }
     80        if (line.startsWith("svn:")) {
     81          builder.append("<font color=red><b>" + line + "</b></font><br>");
     82        } else {
     83          linesCount++;
     84          // limit the number of content lines shown in the svn popup to 30
     85          if (linesCount <= 30) {
     86            builder.append(line + "<br>");
     87          } else if (linesCount == 31) {
     88            builder.append("...<br>");
     89          }
     90        }
    8391        if (line.startsWith("svn: Commit failed")) success = false;
    8492        lastLine = line;
Note: See TracChangeset for help on using the changeset viewer.