summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-07-310-0/+0
|\ | | | | | | | | | | | | | | | | * stable-4.10: Prepare 4.9.4-SNAPSHOT builds JGit v4.9.3.201807311005-r Change-Id: I5f73f240951733e8d81d634aa5340a0861936a0c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-07-310-0/+0
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Prepare 4.9.4-SNAPSHOT builds JGit v4.9.3.201807311005-r Change-Id: Ifd4b815b0f66d44afeafa9ae77a2a714942d675d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 4.9.4-SNAPSHOT buildsMatthias Sohn2018-07-3156-333/+333
| | | | | | | | | | | | | | | Change-Id: Ibb2ee9d00d5d049f681e1abbb449656105e553a7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v4.9.3.201807311005-rv4.9.3.201807311005-rMatthias Sohn2018-07-3156-59/+59
| | | | | | | | | | | | | | | Change-Id: I3f4f437649736c6a27e78d536344c7b31c8a0f65 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-07-275-28/+53
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Prepare 4.7.3-SNAPSHOT builds JGit v4.7.2.201807261330-r Delete all loose refs empty directories Use java.nio to delete path to get detailed errors GC: Remove empty references folders Do not ignore path deletion errors Change-Id: I2b44d862869d4453c57db668fc7c925da591f671 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-07-275-2/+189
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Prepare 4.7.3-SNAPSHOT builds JGit v4.7.2.201807261330-r Delete all loose refs empty directories Use java.nio to delete path to get detailed errors GC: Remove empty references folders Do not ignore path deletion errors Change-Id: Ie7029bc91621af32e7bfd2e0d76a424b991b1995 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-07-275-2/+189
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Prepare 4.7.3-SNAPSHOT builds JGit v4.7.2.201807261330-r Delete all loose refs empty directories Use java.nio to delete path to get detailed errors GC: Remove empty references folders Do not ignore path deletion errors Change-Id: I6ab2b951dd94a9fc1c4f5283847a3e2ec37d0895 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-4.7' into stable-4.8David Pursehouse2018-07-275-2/+192
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Prepare 4.7.3-SNAPSHOT builds JGit v4.7.2.201807261330-r Delete all loose refs empty directories Use java.nio to delete path to get detailed errors GC: Remove empty references folders Do not ignore path deletion errors Change-Id: Iadc8275fbaa3d6f7d08a96ab66d49f392f6aab78 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * Prepare 4.7.3-SNAPSHOT buildsMatthias Sohn2018-07-2756-321/+321
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5c437f45d5bc469e3c32bef1180c127d96d24d23 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * JGit v4.7.2.201807261330-rv4.7.2.201807261330-rMatthias Sohn2018-07-2656-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0d8c7ca756e6236e315c91da000fe8103ce83d05 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Delete all loose refs empty directoriesLuca Milanesio2018-07-264-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove completely the empty directories under refs/<namespace> including the first level partition of the changes, when they are completely empty. Bug: 536777 Change-Id: I88304d34cc42435919c2d1480258684d993dfdca Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Use java.nio to delete path to get detailed errorsLuca Milanesio2018-07-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get the full IOException of the reason why a directory cannot be removed during GC. Change-Id: Ia555bce009fa48087a73d677f1ce3b9c0b685b57 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * GC: Remove empty references foldersHector Caballero2018-07-102-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After packaging references, the folders containing these references are not deleted. In a busy repository, this causes operations to slow down as traversing the references tree becomes longer. Delete empty reference folders after the loose references have been packed. To avoid deleting a folder that was just created by another concurrent operation, only delete folders that were not modified in the last 30 seconds. Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com> Change-Id: Ie79447d6121271cf5e25171be377ea396c7028e0 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * Do not ignore path deletion errorsLuca Milanesio2018-07-081-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log as warning when an attempt to remove a directory fails. This helps troubleshooting some bugs like the GC leaving behind empty directories. Change-Id: Idb94ce17f8be9668a970c7ecae31436bf434073c Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
* | | | | Merge branch 'stable-4.10' into stable-4.11David Pursehouse2018-07-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: ResolveMerger: Fix encoding with string; use bytes Change-Id: I2f02298d0ff7caafeca4020cde4fdfa29a46e585 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | | | Merge branch 'stable-4.9' into stable-4.10David Pursehouse2018-07-041-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: ResolveMerger: Fix encoding with string; use bytes Change-Id: Ibd8f2a041b0de6e008a1ea84b92823f8cbc6e3d2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * | | Merge branch 'stable-4.8' into stable-4.9David Pursehouse2018-07-041-1/+1
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: ResolveMerger: Fix encoding with string; use bytes Change-Id: Id6a85804695d5dcb32f26ed1d861b7c93577c5e4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | * | Merge branch 'stable-4.7' into stable-4.8David Pursehouse2018-07-041-1/+1
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: ResolveMerger: Fix encoding with string; use bytes Change-Id: If17328fbd101d596a8a16d9c4a190e9b6e120902 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * ResolveMerger: Fix encoding with string; use bytesMarco Miller2018-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes the issue [1]. Before this fix, a merge involving the caching of consecutive yet similar filenames with Norwegian characters [2] used to throw an IllegalStateException: Duplicate stages not allowed. This was caused by inaccurate decoding of the filenames, using string values assuming default encoding. In the toString method of DirCacheEntry, used before through getPathString, UTF-8 encoding is used, but the end result becomes default encoding, through Object's default toString usage. The special characters in those two consecutive (particular) filenames [2] were becoming the very same decoded /single character, lending consecutive -but then identical- filenames. Thus the perceived duplicate 0-staging of the file(s). Replace getPathString usage with getRawPath for this specific case, or use byte array representations of cached entries instead of string. Adding a test for this change is not possible, as there is no known way to change the default encoding for filenames such as [2] (e.g.). JGitTestUtil does write file contents through UTF-8, but encoding like so does not apply to the actual file name. Hence there is no way to create files with names properly made of special characters such as [2]'s. And the test that is necessary for this case assumes such Norwegian (or similar characters) filenames. Changing the default locale programmatically in a test has no effect either. And changing the LANG value passed to the JVM is only possible upon starting it. [1] https://bugs.chromium.org/p/gerrit/issues/detail?id=9153 [2] <=> (...) "a/b/SíÒr-Norge.map", "a/b/Sør-Norge.map", (...) Change-Id: Ib9f2f5297932337c9817064cc09d9f774dd168f4 Signed-off-by: Marco Miller <marco.miller@ericsson.com>
* | | | | Merge branch 'stable-4.10' into stable-4.11David Pursehouse2018-06-220-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I9902553ac442821416912d26a5d6ee1b0dc41cf4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | | | Merge branch 'stable-4.9' into stable-4.10David Pursehouse2018-06-210-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I5f256aa6117847a25ab9e15c7d7ccc51e43cbb64 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * | | Merge branch 'stable-4.8' into stable-4.9David Pursehouse2018-06-200-0/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I318813d19445ab7c44384015d36830ed02b8b590 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | * | Merge branch 'stable-4.7' into stable-4.8David Pursehouse2018-06-201-0/+3
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I016c9b3ec0081542bb903f361d9a3af1ea746ae3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * Merge branch 'stable-4.6' into stable-4.7David Pursehouse2018-06-201-0/+3
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: Idc653c22a9af2013a4c481bb19ca8d059f5c34d0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | * Merge branch 'stable-4.5' into stable-4.6David Pursehouse2018-06-191-0/+3
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I2a0e0b63a06f442f5a088d4bc8bb08eaf02ce952 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | * Temporarily @Ignore flaky CommitCommandTest methodsDave Borowitz2018-06-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia2c42d014323bd29b85bf76f1a20c83f612406d7 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> (cherry picked from commit e93b0026ced10c956e76daed038f2560a33b5baf)
* | | | | | | Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-06-110-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Ensure DirectoryStream is closed promptly Change-Id: I2c0d5ea96b2c96336908674032d0f7d39dc062b9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-06-111-13/+13
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ensure DirectoryStream is closed promptly Change-Id: I62674a1db9266c04fb353ab697e2c0a24a7369b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | Ensure DirectoryStream is closed promptlyDave Borowitz2018-06-091-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the javadoc for Files.list: "The returned stream encapsulates a DirectoryStream. If timely disposal of file system resources is required, the try-with-resources construct should be used to ensure that the stream's close method is invoked after the stream operations are completed." This is the only call to Files#newDirectoryStream that is not already in a try-with-resources. Change-Id: I91e6c56b5d74e8435457ad6ed9e6b4b24d2aa14e (cherry picked from commit 1c16ea4601920c9dbc7a0202efc20137e1a63d55)
* | | | | | | Merge "Merge branch 'stable-4.10' into stable-4.11" into stable-4.11Matthias Sohn2018-05-103-30/+56
|\ \ \ \ \ \ \
| * | | | | | | Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-05-103-30/+56
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Retry stale file handles on .git/config file Change-Id: Ice5c8ae8c2992243a81da77e166406bc1930fe0e
| | * | | | | | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-05-103-30/+56
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Retry stale file handles on .git/config file Change-Id: I6db7256dbd1c71b23e1231809642ca21e996e066 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-05-103-31/+56
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Retry stale file handles on .git/config file Change-Id: Ib029b5536c038190626e7a7ff43b70f0a5673721
| | | | * | | | Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2018-05-103-31/+56
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Retry stale file handles on .git/config file Change-Id: Ib665c094b28eefb8236752bb273de0c2d9bf9578
| | | | | * | | Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2018-05-103-31/+56
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Retry stale file handles on .git/config file Change-Id: If5a21d38224528edfc551b3216daca6a2582e3ac
| | | | | | * | Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2018-05-103-31/+56
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Retry stale file handles on .git/config file Change-Id: Ib6e6ec0846c3ef261ec1016bfa6d26d2eadc3f26
| | | | | | | * Retry stale file handles on .git/config fileNasser Grainawi2018-05-103-31/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a local non-NFS filesystem the .git/config file will be orphaned if it is replaced by a new process while the current process is reading the old file. The current process successfully continues to read the orphaned file until it closes the file handle. Since NFS servers do not keep track of open files, instead of orphaning the old .git/config file, such a replacement on an NFS filesystem will instead cause the old file to be garbage collected (deleted). A stale file handle exception will be raised on NFS clients if the file is garbage collected (deleted) on the server while it is being read. Since we no longer have access to the old file in these cases, the previous code would just fail. However, in these cases, reopening the file and rereading it will succeed (since it will open the new replacement file). Since retrying the read is a viable strategy to deal with stale file handles on the .git/config file, implement such a strategy. Since it is possible that the .git/config file could be replaced again while rereading it, loop on stale file handle exceptions, up to 5 extra times, trying to read the .git/config file again, until we either read the new file, or find that the file no longer exists. The limit of 5 is arbitrary, and provides a safe upper bounds to prevent infinite loops consuming resources in a potential unforeseen persistent error condition. Change-Id: I6901157b9dfdbd3013360ebe3eb40af147a8c626 Signed-off-by: Nasser Grainawi <nasser@codeaurora.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | LFS: Fix potential NPE in LfsPrePushHookMarkus Duft2018-04-041-0/+4
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NPE occurred in conjunction with a symbolic ref (origin/HEAD). Change-Id: I291636818a121ca00e0df25de5b6fc71a48d447f Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* | | | | | | Remove package import for javax.servlet.http from org.eclipse.jgitMatthias Sohn2018-03-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This package import is unused. Change-Id: I9f202bb3162736a1ef8054516f1a3145d3a7bb9b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Add missing @since tag and silence API errorMatthias Sohn2018-03-272-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods were introduced for 4.11.1 so we have to silence the API error adding API in a service release raises. Change-Id: Ic847cebbed439912d3979ec2ec1809f77a28f61e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | ObjectIdSerializer: Support serialization of known non-null ObjectIdDavid Pursehouse2018-03-152-17/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of ObjectIdSerializer, added in change I7599cf8bd, is not equivalent to the original implementation in Gerrit [1]. The Gerrit implementation provides separate methods to (de)serialize instances of ObjectId that are known to be non-null. In these methods, no "marker" is written to the stream. Replacing Gerrit's implementation with ObjectIdSerializer [2] broke persistent caches because it started writing markers where they were not expected [3]. Since ObjectIdSerializer is included in JGit 4.11 we can't change the existing #write and #read methods. Keep those as-is, but extend the Javadoc to clarify that they support possibly null ObjectId instances. Add new methods #writeWithoutMarker and #readWithoutMarker to support the cases where the ObjectId is known to be non-null and the marker should not be written to the serialization stream. Also: - Replace the hard-coded `0` and `1` markers with constants that can be linked from the Javadocs. - Include the marker value in the "Invalid flag before ObjectId" exception message. [1] https://gerrit-review.googlesource.com/c/gerrit/+/9792 [2] https://gerrit-review.googlesource.com/c/gerrit/+/165851 [3] https://gerrit-review.googlesource.com/c/gerrit/+/165952 Change-Id: Iaf84c3ec32ecf83efffb306fdb4940cc85740f3f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | Prepare 4.11.1-SNAPSHOT buildsMatthias Sohn2018-03-0856-357/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | JGit v4.11.0.201803080745-rv4.11.0.201803080745-rMatthias Sohn2018-03-0856-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Remove useless for(;;) loopThomas Wolf2018-03-071-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic9a7824cc178e92f44126acc8e77b0304b20ef4f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Fix DiffFormatter for diffs against working tree with autocrlf=trueThomas Wolf2018-03-073-3/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WorkingTreeSource produced an ObjectLoader that returned inconsistent sizes: the file size in getSize(), but then a correctly filtered smaller stream in openStream(). This resulted either in an IOE "short read of block" or in an EOFException depending on the resulting filtered size. Fix this by ensuring that getSize() does return the size of the filtered stream. Bug: 530106 Change-Id: I7c7c85036047dc10030ed29c1d5a6c7f34f2bdff Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Merge branch 'stable-4.10'Matthias Sohn2018-03-072-9/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Don't subclass ThreadLocal to avoid memory leak in NLS Set context classloader to null in WorkQueue Change-Id: Idacf9a15a27f8e1d73357a80ed11a02237eea49e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | Don't subclass ThreadLocal to avoid memory leak in NLSMatthias Sohn2018-02-141-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These problem usually occur when you subclass ThreadLocal (usually to implement initialValue). Those classes reference the webapp's classloader. The ThreadLocal subclass in turn is referenced by each Thread instance (that's how ThreadLocals are implemented, they have a "helper-Map" in each Thread instance, so the leak is actually not a tiny Random instance but the whole webapp's classloader with a bunch of class definitions and statically referenced parts of the webapp. Bug: 449321 Change-Id: Ie7a8b0b90e40229e2471202f2a12637b9e0b1d11 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | Set context classloader to null in WorkQueueMatthias Sohn2018-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If threads created by the executor have a reference to the context classloader this may cause a leak. See: https://wiki.apache.org/tomcat/MemoryLeakProtection#cclThreadSpawnedByWebApp Bug: 517107 Change-Id: If79c1ebd3f9cf733fd88a5fce38fd46ff0d08d10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | LFS: Adjust some API to make integration into tools (EGit,...) easierMarkus Duft2018-03-073-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the install command accessible without requiring reflection. Expose the isEnabled(Repository) API to be able to check if calling the install command is required for a repository. Change-Id: I17e6eaefb6afda17fea8162cbf0cb86a20506753 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | MergeHeadMsgTest: Open FileOutputStream in try-with-resourceDavid Pursehouse2018-03-071-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8efa549b98bf661665dc29d48d0e5661b0e8530c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>