Commit Graph

8730 Commits

Author SHA1 Message Date
Matthias Sohn 1343dd2de7 Merge branch 'stable-5.6' into stable-5.7
* stable-5.6:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: I274d46d73cc896dcfde6e24c69c71f33aaa78d20
2021-12-30 23:53:54 +01:00
Matthias Sohn a461472bd5 Merge branch 'stable-5.5' into stable-5.6
* stable-5.5:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: If904289feecd1e0d8466c1fb998f160f14d54b61
2021-12-30 23:51:41 +01:00
Matthias Sohn d87e5e07a5 Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: I84e11bdaa9306e23212dac9d8670557a18d40107
2021-12-30 23:41:54 +01:00
Matthias Sohn 7f51f8acd8 Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: I3d8eb2fa721e1a791db47a2342acc690ced01715
2021-12-30 23:40:21 +01:00
Matthias Sohn 62c2159b62 Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: Ib79c310c5b632e845ba69ce65e739ae0146103ca
2021-12-30 23:33:06 +01:00
Matthias Sohn f33ae743ad Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: I17ede8876a0cf231c38cb9652c7bf51553b1e90e
2021-12-30 23:18:21 +01:00
Luca Milanesio fed0ab9baa Use FileSnapshot without using configs for FileBasedConfig
FileBasedConfig should not rely on auto-detection of
the file-snapshot attribute computation based on config.

The check was already performed when a new FileBasedConfig
is created at L158:

// don't use config in this snapshot to avoid endless recursion
newSnapshot = FileSnapshot.saveNoConfig(getFile());

The check was missing though when the FileBasedConfig is saved
to disk and the new snapshot is obtained from the associated
LockFile.

This change fixes the issue by keeping a non-config based
FileSnapshot also after a FileBasedConfig is saved.

Bug: 577983
Change-Id: Id1e410ba687e683ff2b2643af31e1110b103b356
2021-12-30 11:14:47 +01:00
Thomas Wolf 7146bde45f Merge branch 'stable-5.13' into stable-6.0
* stable-5.13:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"
  TreeRevFilter: fix wrong stop when the given path disappears

Change-Id: Ibd69e9d941ad9262b61dd0c4368e48cb82597a12
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 16:04:44 +01:00
Thomas Wolf 41406e278f Merge branch 'stable-5.12' into stable-5.13
* stable-5.12:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I6576872cc0f5dd452252fa6e4526086cdee65c28
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 16:03:20 +01:00
Thomas Wolf f86d82fc30 Merge branch 'stable-5.11' into stable-5.12
* stable-5.11:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Ib80336a42e22da729b9db1e573772504cc0a3e77
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 16:02:35 +01:00
Thomas Wolf 5f8c593bb6 Merge branch 'stable-5.10' into stable-5.11
* stable-5.10:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I9e79ea2a0c554a184e4ce3b13e375eac8b7a4ac5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 16:01:49 +01:00
Thomas Wolf 8a9b4972b4 Merge branch 'stable-5.9' into stable-5.10
* stable-5.9:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I2a84c838a886d1d6383c34f50b418baa743c57b0
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 16:00:48 +01:00
Thomas Wolf 95ea1c1123 Merge branch 'stable-5.8' into stable-5.9
* stable-5.8:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I88a629e571fec5a9820114ebf5765b5d94a276bd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:58:28 +01:00
Thomas Wolf 9fd632b0e4 Merge branch 'stable-5.7' into stable-5.8
* stable-5.7:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Ied786ab5e3c0dd05f701705fce2d4ad85502c4d6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:57:42 +01:00
Thomas Wolf d295294dbe Merge branch 'stable-5.6' into stable-5.7
* stable-5.6:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I454622dae6eb95aedbd858e3b12da72282d36673
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:56:33 +01:00
Thomas Wolf 1c689d18c4 Merge branch 'stable-5.5' into stable-5.6
* stable-5.5:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I2622f1d384a88a556ba9d88f0d08a37af69e530c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:55:32 +01:00
Thomas Wolf fd612a1282 Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Ia1665dd92ccc3811a6116f41421a05aca10fc6eb
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:54:12 +01:00
Thomas Wolf 4cc21ccd3d Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I52a57a17abe60e30e3d7615f8cb4d0c5e6aebd9b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:53:17 +01:00
Thomas Wolf 7edb062d8c Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Id37f47a5ef2e3c8329eca30c171941f7e5606a85
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:52:03 +01:00
Thomas Wolf f2d4783c52 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I625667c2718ab31ae7df907c3dd6024a933913b8
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:50:42 +01:00
Thomas Wolf 7828ef349c Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"
This reverts commit f829f5f838.

Using MISSING_FILEKEY as indicator for a non-existing file doesn't work
on Windows.

Bug: 577954
Change-Id: I92102a3d259f6cc0f367096a3213cfa794466817
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-12-26 15:38:26 +01:00
kylezhao 3d7351ee50 TreeRevFilter: fix wrong stop when the given path disappears
When chgs[i] == adds[i], it indicated that a commit added some files
that pList[i] did not have, but didn't mean pList[i] is "empty tree
root".

Follow the example below:

.                           .
└── src                     └── src
    └── d1          ==>          └── d1
        └─ file1                    ├─  file1
                                    └── file2
   c.parents[i]                   c

The variable chg[i] equals to variable add[i],
but commit c.parents[i] is not "empty tree root".

We should add an additional check for no paths matching the filter.

Bug: 577227
Change-Id: I834e9ddd0de86b108b280a1139519ea962913b38
Signed-off-by: kylezhao <kylezhao@tencent.com>
2021-12-17 00:29:11 +01:00
Matthias Sohn 284d2b5b9c Merge branch 'stable-5.13' into stable-6.0
* stable-5.13:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: Icea0a4dced9688392e7f2411b98df52aed2b9c8c
2021-12-04 21:15:42 +01:00
Matthias Sohn 35713588fe Merge branch 'stable-5.12' into stable-5.13
* stable-5.12:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I9c85b3a774480c4f4b56ecdf5015916349a0ddc0
2021-12-04 21:06:33 +01:00
Matthias Sohn 1cffba4385 Merge branch 'stable-5.11' into stable-5.12
* stable-5.11:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I72f39fbe82dd578d71aa2e3ceccebb39a25c4e00
2021-12-04 20:42:56 +01:00
Matthias Sohn e14b25f240 Merge branch 'stable-5.10' into stable-5.11
* stable-5.10:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I84c73e11381c31566a12033db94e9afdcef5b705
2021-12-04 20:28:53 +01:00
Matthias Sohn 8583b3c56c Merge branch 'stable-5.9' into stable-5.10
* stable-5.9:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I971745b529ff903ea8bf9c3dbbc746fa09f41041
2021-12-04 19:31:53 +01:00
Matthias Sohn 70b894da19 Merge branch 'stable-5.8' into stable-5.9
* stable-5.8:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I5e7c204c0e4c428df6f3b27ba1fc06326983f27c
2021-12-04 19:19:16 +01:00
Matthias Sohn 73b3cbd26b Merge branch 'stable-5.7' into stable-5.8
* stable-5.7:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot
creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: Ibe46e8479b57a54591ad7bd3cc29bf4a5274e43d
2021-12-04 18:55:17 +01:00
Matthias Sohn 994434a1ca Add missing @since tags
Change-Id: Iaeca1d6154c1383ebe27b723e8814e262328eb48
2021-12-04 18:34:48 +01:00
Matthias Sohn 85e11bd597 Merge branch 'stable-5.6' into stable-5.7
* stable-5.6:
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I53e6cb4b3a34b32d964e486c1ff3d130eed6e406
2021-12-04 18:14:00 +01:00
Matthias Sohn 2e5110eda0 Add missing @since tag
Change-Id: I665c860696b6981dfec87a60c4eb95060a02436f
2021-12-04 18:07:09 +01:00
Matthias Sohn a1c9c82e85 Merge branch 'stable-5.5' into stable-5.6
* stable-5.5:
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I007e92c12fde8d765b75f103e9d530aa0834b7d7
2021-12-04 18:06:32 +01:00
Matthias Sohn 8924b14d3a Add missing @since tags
Change-Id: Id21e626201363dd3d0358bd709765e7fd07a0cbf
2021-12-04 17:47:48 +01:00
Matthias Sohn d8f5b5c691 Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I5ce55c6c152a59602fef9fb08c16dedf666444e2
2021-12-04 17:46:20 +01:00
Matthias Sohn 7ae2ee300a Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: I0e80612c8ddb934466105312f9107e91d581de0b
2021-12-04 02:31:06 +01:00
Matthias Sohn dc41de0e3c Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: Id989365446cb55b9188e02e6e1f8cbc8ab71071c
2021-12-04 01:58:53 +01:00
Matthias Sohn f8f4357d63 Remove unused import in ApacheSshTest
Change-Id: I55ebddf232369389e717bbf8707f6e785de14bce
2021-12-04 01:40:36 +01:00
Matthias Sohn c25e8b3dee Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: If3ad2cfb6c341b0ff5c2120a5a1646f6368d86e7
2021-12-04 01:26:11 +01:00
Matthias Sohn f1547eec05 Update maven plugins
- build-helper-maven-plugin to 3.2.0
- jacoco-maven-plugin to 0.8.7
- maven-antrun-plugin to 3.0.0
- maven-dependency-plugin to 3.2.0
- maven-enforcer-plugin to 3.0.0
- maven-jar-plugin to 3.2.0
- maven-javadoc-plugin to 3.3.1
- maven-jxr-plugin to 3.1.1
- maven-pmd-plugin to 3.15.0
- maven-project-info-reports-plugin to 3.1.2
- maven-resources-plugin to 3.2.0
- maven-shade-plugin to 3.2.4
- maven-site-plugin to 3.9.1
- maven-source-plugin to 3.2.1
- maven-surefire-plugin to 3.0.0-M5
- spotbugs-maven-plugin to 4.3.0
- tycho and tycho-extras to 1.7.0

Change-Id: I7738fbfd7db60ddbeb372efcb4c72c71112ac231
2021-12-03 23:16:55 +01:00
Matthias Sohn fe3071f0e5 Ignore missing javadoc in test bundles
Change-Id: I83ed20823dc6b22ff48c2a554acb2f7d3b6067b7
(cherry picked from commit 12f39c26b0)
2021-12-03 22:14:25 +01:00
Nasser Grainawi 38db89142d storage: file: De-duplicate File.exists()+File.isFile()
File.isFile() [1] checks if the file exists and is a normal file.

[1] https://docs.oracle.com/javase/8/docs/api/java/io/File.html#isFile--

Change-Id: I0a883f2482ecc5ac58b270351b416742b568eb68
Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
2021-12-03 22:09:50 +01:00
Kaushik Lingarkar f829f5f838 RefDirectory.scanRef: Re-use file existence check done in snapshot creation
Return immediately in scanRef if the loose ref was identified as
missing when a snapshot was attempted for the ref. This will help
performance of scanRef when the ref is packed but has a corresponding
empty dir in 'refs/'.

For example, consider the case where we create 50k sharded refs in
a new namespace called 'new-refs' using an atomic 'BatchRefUpdate'.
The refs are named like 'refs/new-refs/01/1/1', 'refs/new-refs/01/1/2',
'refs/new-refs/01/1/3' and so on. After the refs are created, the
'new-refs' namespace looks like below:

$ find refs/new-refs -type f | wc -l
0

$ find refs/new-refs -type d | wc -l
5101

At this point, an 'exactRef' call on each of the 50k refs without
this change takes ~2.5s, where as with this change it takes ~1.5s.

Change-Id: I926bc41b9ae89a1a792b1b5ec9a17b05271c906b
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
2021-12-03 22:06:46 +01:00
Kaushik Lingarkar 5606a53151 FileSnapshot: Lazy load file store attributes cache
Doing a getFileStoreAttributes call even when the file doesn't
exist is unnecessary. This call is particularly slow on some
filesystems. Instead, do it only when the file exists and load
the appropriate cache.

This update can help speed up RefDirectory.exactRef when the ref
is packed, but has a corresponding empty dir for it under 'refs/'.
This scenario can happen when an atomic 'BatchRefUpdate' creates
new sharded refs.

For example, consider the case where we create 50k sharded refs in
a new namespace called 'new-refs' using an atomic 'BatchRefUpdate'.
The refs are named like 'refs/new-refs/01/1/1', 'refs/new-refs/01/1/2',
'refs/new-refs/01/1/3' and so on. After the refs are created, the
'new-refs' namespace looks like below:

$ find refs/new-refs -type f | wc -l
0

$ find refs/new-refs -type d | wc -l
5101

At this point, an 'exactRef' call on each of the 50k refs without
this change takes ~30s, where as with this change it takes ~2.5s.

Change-Id: I4a5d4c6a652dbeed1f4bc3b4f2b2f1416f7ca0e7
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
2021-12-02 10:45:37 +01:00
Matthias Sohn 09c923073a Update eclipse-jarsigner-plugin to 1.3.2
Change-Id: Id5d05d96c392913de7b4451421c2ffb7b63ab83f
(cherry picked from commit c70c0acb47)
2021-12-02 10:45:36 +01:00
Matthias Sohn c213a6628e Fix p2 repository URLs
- the old jetty releases were moved to the archive server
- use https
- use eclipse 4.9 release repository

Change-Id: I2ca20dd828a9272a383e166e6ad82390415891cf
2021-12-02 09:56:27 +01:00
Matthias Sohn fb684a3821 Add o.e.j.ssh.apache.agent to maven central deployment scripts
Change-Id: I3310eacafa83482191021beddd376d50c0a72775
2021-11-29 21:14:25 +01:00
Matthias Sohn 30b79cd0e8 Prepare 6.0.1-SNAPSHOT builds
Change-Id: Iddb67ed9578293b83b8147aa18dd8319426f83d1
2021-11-29 17:37:27 +01:00
Matthias Sohn 9492e84fe5 JGit v6.0.0.202111291000-r
Change-Id: I6441d9226e8131552bfafe1fb2c353f2e07e42ac
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-11-29 16:10:14 +01:00
Matthias Sohn 26fb2b7f08 Don't block in GC#gc until garbage collection finished
Let GC#gc return collection of newly created packs as CompletableFuture
to enable using gc() asynchronously.

Change-Id: I3627014fd458c738cfe54225e631d6f7d9cfb1a7
2021-11-28 12:09:24 +01:00