]> source.dussan.org Git - jgit.git/commitdiff
Merge branch 'stable-5.3' into stable-5.4 53/143453/2
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 6 Jun 2019 09:34:56 +0000 (11:34 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 6 Jun 2019 15:14:31 +0000 (17:14 +0200)
* stable-5.3:
  Prepare 5.3.3-SNAPSHOT builds
  JGit v5.3.2.201906051522-r
  Prepare 5.1.9-SNAPSHOT builds
  JGit v5.1.8.201906050907-r
  Test detecting modified packfiles
  Enhance fsTick() to use filesystem timer resolution
  Add debug trace to measure time needed to open pack index
  Extend FileSnapshot for packfiles to also use checksum to detect changes
  Wait opening new packfile until it can't be racy anymore
  Avoid null PackConfig in GC
  Add FileSnapshot test testing recognition of file size changes
  Capture reason for result of FileSnapshot#isModified
  Skip FileSnapshotTest#testSimulatePackfileReplacement on Windows
  Tune max heap size for tests
  Fix FileSnapshotTest.testNewFileNoWait() to match its javadoc
  ObjectDirectory: fix closing of obsolete packs
  Update API filters for methods added to fix bugs
  Bazel: Increase severity of most error-prone checks to ERROR
  Enable error-prone checks by default
  Add bazel options to align with gerrit's
  Include filekey file attribute when comparing FileSnapshots
  Measure file timestamp resolution used in FileSnapshot
  Fix FileSnapshot's consideration of file size
  Fix API problem filters
  Fix API problem filters

Change-Id: Ie1c7e4752661aec9e1754660934921224e2408eb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
1  2 
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java

index 0d261f9f522024d3239dc556fe2036acbeb4bb46,64d7c057522c94a5e121fb80aa60983a960cf924..7be4bd1ca98187b34e8d5540d76030c4512f2897
@@@ -21,5 -21,5 +21,4 @@@ Import-Package: org.eclipse.jgit.intern
   org.junit;version="[4.12,5.0.0)",
   org.junit.runner;version="[4.12,5.0.0)",
   org.junit.runners;version="[4.12,5.0.0)"
 -Export-Package: org.eclipse.jgit.lfs.test;version="5.3.3";x-friends:="org.eclipse.jgit.lfs.server.test"
 -
 +Export-Package: org.eclipse.jgit.lfs.test;version="5.4.0";x-friends:="org.eclipse.jgit.lfs.server.test"
index dc1df596330222bb6a83d6ce2bb1d9b9624ea25f,eb93d3e2b03c664c5be1547ed498c8ea6c926695..6719570e0509d14ad6871597e295e2986001681b
              </message_arguments>
          </filter>
      </resource>
 +    <resource path="src/org/eclipse/jgit/lib/Ref.java" type="org.eclipse.jgit.lib.Ref">
 +        <filter id="403767336">
 +            <message_arguments>
 +                <message_argument value="org.eclipse.jgit.lib.Ref"/>
 +                <message_argument value="UNDEFINED_UPDATE_INDEX"/>
 +            </message_arguments>
 +        </filter>
 +    </resource>
 +    <resource path="src/org/eclipse/jgit/revwalk/ObjectWalk.java" type="org.eclipse.jgit.revwalk.ObjectWalk">
 +        <filter comment="ignore the risk subclasses could define the same field and cause a name clash" id="336658481">
 +            <message_arguments>
 +                <message_argument value="org.eclipse.jgit.revwalk.ObjectWalk"/>
 +                <message_argument value="SIMPLE_VISITATION_POLICY"/>
 +            </message_arguments>
 +        </filter>
 +    </resource>
+     <resource path="src/org/eclipse/jgit/storage/pack/PackConfig.java" type="org.eclipse.jgit.storage.pack.PackConfig">
+         <filter id="336658481">
+             <message_arguments>
+                 <message_argument value="org.eclipse.jgit.storage.pack.PackConfig"/>
+                 <message_argument value="DEFAULT_MINSIZE_PREVENT_RACY_PACK"/>
+             </message_arguments>
+         </filter>
+         <filter id="336658481">
+             <message_arguments>
+                 <message_argument value="org.eclipse.jgit.storage.pack.PackConfig"/>
+                 <message_argument value="DEFAULT_WAIT_PREVENT_RACY_PACK"/>
+             </message_arguments>
+         </filter>
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.1.8"/>
+                 <message_argument value="DEFAULT_MINSIZE_PREVENT_RACY_PACK"/>
+             </message_arguments>
+         </filter>
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.1.8"/>
+                 <message_argument value="DEFAULT_WAIT_PREVENT_RACY_PACK"/>
+             </message_arguments>
+         </filter>
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.1.8"/>
+                 <message_argument value="doWaitPreventRacyPack(long)"/>
+             </message_arguments>
+         </filter>
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.1.8"/>
+                 <message_argument value="getMinSizePreventRacyPack()"/>
+             </message_arguments>
+         </filter>
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.1.8"/>
+                 <message_argument value="isWaitPreventRacyPack()"/>
+             </message_arguments>
+         </filter>
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.1.8"/>
+                 <message_argument value="setMinSizePreventRacyPack(long)"/>
+             </message_arguments>
+         </filter>
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.1.8"/>
+                 <message_argument value="setWaitPreventRacyPack(boolean)"/>
+             </message_arguments>
+         </filter>
+     </resource>
 +    <resource path="src/org/eclipse/jgit/storage/pack/PackStatistics.java" type="org.eclipse.jgit.storage.pack.PackStatistics$Accumulator">
 +        <filter comment="ignore the risk subclasses could define the same field and cause a name clash" id="336658481">
 +            <message_arguments>
 +                <message_argument value="org.eclipse.jgit.storage.pack.PackStatistics.Accumulator"/>
 +                <message_argument value="treesTraversed"/>
 +            </message_arguments>
 +        </filter>
 +    </resource>
 +    <resource path="src/org/eclipse/jgit/transport/Transport.java" type="org.eclipse.jgit.transport.Transport">
 +        <filter comment="Marked as final since overriding a deprecated stub is likely a mistake" id="421654647">
 +            <message_arguments>
 +                <message_argument value="org.eclipse.jgit.transport.Transport"/>
 +                <message_argument value="getFilterBlobLimit()"/>
 +            </message_arguments>
 +        </filter>
 +        <filter comment="Marked as final since overriding a deprecated stub is likely a mistake" id="421654647">
 +            <message_arguments>
 +                <message_argument value="org.eclipse.jgit.transport.Transport"/>
 +                <message_argument value="setFilterBlobLimit(long)"/>
 +            </message_arguments>
 +        </filter>
 +    </resource>
 +    <resource path="src/org/eclipse/jgit/transport/UploadPack.java" type="org.eclipse.jgit.transport.UploadPack">
 +        <filter id="421654647">
 +            <message_arguments>
 +                <message_argument value="org.eclipse.jgit.transport.UploadPack"/>
 +                <message_argument value="getFilterBlobLimit()"/>
 +            </message_arguments>
 +        </filter>
 +    </resource>
+     <resource path="src/org/eclipse/jgit/util/FS.java" type="org.eclipse.jgit.util.FS">
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.2.3"/>
+                 <message_argument value="getFsTimerResolution(Path)"/>
+             </message_arguments>
+         </filter>
+     </resource>
+     <resource path="src/org/eclipse/jgit/util/FileUtils.java" type="org.eclipse.jgit.util.FileUtils">
+         <filter id="1142947843">
+             <message_arguments>
+                 <message_argument value="5.2.3"/>
+                 <message_argument value="touch(Path)"/>
+             </message_arguments>
+         </filter>
+     </resource>
  </component>
index c1aac23726ed77702192f45517c16cf9311671a2,73ad38c95a5724a2074b283b916ef5edac16c17e..a89e2ec03d2eb8c6008cae1c8b4488d815447a03
@@@ -100,9 -102,14 +102,10 @@@ import org.slf4j.LoggerFactory
   * objects are similar.
   */
  public class PackFile implements Iterable<PackIndex.MutableEntry> {
+       private final static Logger LOG = LoggerFactory.getLogger(PackFile.class);
        /** Sorts PackFiles to be most recently created to least recently created. */
 -      public static final Comparator<PackFile> SORT = new Comparator<PackFile>() {
 -              @Override
 -              public int compare(PackFile a, PackFile b) {
 -                      return b.packLastModified - a.packLastModified;
 -              }
 -      };
 +      public static final Comparator<PackFile> SORT = (PackFile a,
 +                      PackFile b) -> b.packLastModified - a.packLastModified;
  
        private final File packFile;
  
index 530bd9fb108d05e1c4613721ffea6b2684b61f1a,9bba6ca8a37432129aff05252112ce0adf7edb67..0e8732d6feb735c81a56fafe0d229f5ef5ed7875
@@@ -48,8 -48,8 +48,9 @@@ package org.eclipse.jgit.util
  import static java.nio.charset.StandardCharsets.UTF_8;
  
  import java.io.File;
 +import java.io.FileNotFoundException;
  import java.io.IOException;
+ import java.io.OutputStream;
  import java.nio.file.AtomicMoveNotSupportedException;
  import java.nio.file.CopyOption;
  import java.nio.file.Files;