aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit
Commit message (Collapse)AuthorAgeFilesLines
* TestRepository: Stop using deprecated methods in SystemReaderIvan Frade11 days1-2/+2
| | | | Change-Id: I1d1f174f739137c24fb586cb2f6d054d4785d716
* TestRepository: add version when annotated methods became deprecatedMatthias Sohn14 days1-2/+2
| | | | Change-Id: Ib9466bfbc3d7ecf53af88dd6b5bade7ae48c7165
* LocalDiskRepositoryTestCase: Use java.time API to create PersonIdentIvan Frade2024-12-231-2/+3
| | | | | | | | | | | This code is using deprecated methods in the mock system reader to invoke a deprecated constructor of PersonIdent. Both classes have now new methods with the java.time API. Use java.time methods to get the timestamp and timezone and build the PersonIdent. Change-Id: I4271d9d1d3c9128cfcedc680410448498530de88
* Add missing @since 7.2 to TestRepository#getTimeZoneIdMatthias Sohn2024-12-201-0/+1
| | | | Change-Id: Icf3b29d075e5d91e64cea06dcd75119745bd13e0
* TestRepository: Deprecate #getDate and use #getInstant insteadIvan Frade2024-12-131-9/+24
| | | | | | | | | | | Errorprone recomments to use the more modern java.time API instead of the java.util.Date family of classes. This removes all uses of TestRepository#getDate and replace them with getInstant. The method is marked as deprecated and doesn't have any other usages. Change-Id: I84ea63abf781d0d3c7c2724891fd2ef7afc2db1d
* Prepare 7.2.0-SNAPSHOT buildsMatthias Sohn2024-11-273-24/+24
| | | | Change-Id: Ie3108fefbcbb55a4f26273833c9817ce4bd750f1
* Prepare 7.1.1-SNAPSHOT buildsMatthias Sohn2024-11-263-24/+24
| | | | Change-Id: Ifc710a83cda50f1275cbbd5a828f92d95607f298
* JGit v7.1.0.202411261347-rv7.1.0.202411261347-rMatthias Sohn2024-11-263-4/+4
| | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I70f154dd1dc8571c5e2057d09d08d4a4d1b7ee37
* Prepare 7.1.0-SNAPSHOT buildsMatthias Sohn2024-11-193-4/+4
| | | | Change-Id: I69f57f933899b9926ab5124b24b90ae75f7a8d09
* JGit v7.1.0.202411191359-rc1v7.1.0.202411191359-rc1Matthias Sohn2024-11-193-4/+4
| | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I802c3dbcbb05470aad6255cc05402647e704b446
* SystemReader#now: make it a concrete methodIvan Frade2024-11-141-6/+0
| | | | | | | | | | | | | Abstract methods break subclasses (e.g. DelegateSystemReader in gerrit). Updating jgit and gerrit is simpler if we do not add them. I am not sure why some methods are abstract and others dont, but now() can be a concrete method. Make now() concrete. Implement it by default based on getCurrentTime(), so subclasses overriding that method get the same value. Change-Id: I697749f8cba698c5388ed13ebdc2b238d6259358
* MockSystemReader: create the right time zoneIvan Frade2024-11-131-1/+1
| | | | | | | | | Using this timezone in a later commit, it complains: Exception java.time.DateTimeException: Zone offset minutes and seconds must be negative because hours is negative Change-Id: I5787b51f98109942ac33e0496c5e3761914b2a78
* SystemReader: Give a default implementation to #getTimezoneAt()Ivan Frade2024-11-131-5/+0
| | | | | | | | | | | This abstract method forces subclasses (e.g. DelegateSystemReader in gerrit) to update their code, but there is no strong reason to make it abstract (subclasses can override it if needed). Make the method concrete using the current default implementation (which is the same in the mock). Change-Id: Id1df0d71cab1d86879adf48e782f0050d3abcfa9
* Don't fail when trying to prune pack which is already goneJacek Centkowski2024-11-121-1/+2
| | | | | | | | | Update the TestRepository.prunePacked so that it doesn't fail if a pack to be pruned is already gone. It is especially handy when prunePacked function is called in `TestRepository.packAndPrune` function after repo moves on after the GC was performed. Change-Id: I01b4ddbaddec1fdc24cfbb967e0edfe0de6c4b7c
* Merge branch 'stable-7.0'Matthias Sohn2024-11-121-3/+7
|\ | | | | | | | | | | | | | | | | | | * stable-7.0: Replace custom encoder Constants#encodeASCII by JDK implementation Replace custom encoder `Constants#encode` by JDK implementation Add `numberOfPackFilesAfterBitmap` to RepoStatistics Enhance CommitBuilder#parent to tolerate null parent Change-Id: I46f961144f2e3c4c57ef0f63a9c8954fee8133e9
| * Merge branch 'stable-6.10' into stable-7.0Matthias Sohn2024-11-111-3/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.10: Replace custom encoder Constants#encodeASCII by JDK implementation Replace custom encoder `Constants#encode` by JDK implementation Add `numberOfPackFilesAfterBitmap` to RepoStatistics Enhance CommitBuilder#parent to tolerate null parent Change-Id: If05b0d474c728b54cab9af2b7416be30b2754d1b
| | * Enhance CommitBuilder#parent to tolerate null parentMatthias Sohn2024-11-071-3/+7
| | | | | | | | | | | | Change-Id: Ifdeafd040bca8331804c3e7568da0bee5cbd01df
| | * Prepare 6.10.1-SNAPSHOT buildsMatthias Sohn2024-06-043-24/+24
| | | | | | | | | | | | Change-Id: I3384e7405cadf063e7b0dd25468a8651c45628ac
| | * JGit v6.10.0.202406032230-rv6.10.0.202406032230-rMatthias Sohn2024-06-043-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Id188a6cdc2db63c961f0b9338e6ae56d58853dff
| | * JGit v6.10.0.202406032110-rv6.10.0.202406032110-rMatthias Sohn2024-06-033-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I3128b2e4bbbed97adde90f7a47e15175e63e97f5
| | * Prepare 6.10.0-SNAPSHOT buildsMatthias Sohn2024-06-023-4/+4
| | | | | | | | | | | | Change-Id: I64f6d6a0599cbab462dca236c00e6f3314b2a810
| | * JGit v6.10.0.202405290101-rc1v6.10.0.202405290101-rc1Matthias Sohn2024-05-293-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Ie3d08213e00fcfe1fc34a39021dd99f27e0abc1f
| | * JGit v6.10.0.202405282244-rc1v6.10.0.202405282244-rc1Matthias Sohn2024-05-293-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Ia525790e0b4c9011b29768d2b9727cb48b21ba84
| | * Prepare 6.10.0-SNAPSHOT buildsMatthias Sohn2024-05-223-4/+4
| | | | | | | | | | | | Change-Id: I5b6d5c23d504fac386ae04c42b735152fbbcd7ae
| | * JGit v6.10.0.202405212237-m3v6.10.0.202405212237-m3Matthias Sohn2024-05-223-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I4efb1066ee4146d0455c39cc07879533b8933e43
| | * Prepare 6.10.0-SNAPSHOT buildsMatthias Sohn2024-03-053-24/+24
| | | | | | | | | | | | Change-Id: Ie728ef9a7d3c6430a5da30f6a61afd2176015748
| | * Prepare 6.9.1-SNAPSHOT buildsMatthias Sohn2024-03-053-24/+24
| | | | | | | | | | | | Change-Id: I10f901209be2faa34ebb9355c86c2106bac38ba5
| | * JGit v6.9.0.202403050737-rv6.9.0.202403050737-rMatthias Sohn2024-03-053-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I70494c0c69ac549dea9b4cf7c5b25e94c1b4b250
| | * JGit v6.9.0.202403050045-rv6.9.0.202403050045-rMatthias Sohn2024-03-053-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I4c7a6542ad4252c5a9499e69f68650d2026bde40
| | * Prepare 6.9.0-SNAPSHOT buildsMatthias Sohn2024-03-053-4/+4
| | | | | | | | | | | | Change-Id: Ifadeead735c8772e58dd4e5c7381b44c5221a295
| | * JGit v6.9.0.202402281855-rc1v6.9.0.202402281855-rc1Matthias Sohn2024-02-283-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I23d489ccdc257a8c25da4b90dc51d4a8951d320c
| | * Prepare 6.9.0-SNAPSHOT buildsMatthias Sohn2024-02-223-4/+4
| | | | | | | | | | | | Change-Id: I11f4871bfdf6c6c0de5d5ed577edf16bac8cf681
| | * JGit v6.9.0.202402211805-m3v6.9.0.202402211805-m3Matthias Sohn2024-02-213-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Id2f3934947d6d1e94feeb9e73ad7282ae089b682
* | | SystemReader: Offer methods with java.time APIIvan Frade2024-11-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error prone explains: The Date API is full of major design flaws and pitfalls and should be avoided at all costs. Prefer the java.time APIs, specifically, java.time.Instant (for physical time) and java.time.LocalDate[Time] (for civil time). Add to SystemReader methods to get the time and timezone in the new java.time classes (Instant/ZoneId) and mark as deprecated their old counterparts. The mapping of methods is: * #getCurrentTime -> #now (returns Instant instead of int) * #getTimezone -> #getTimeZoneAt (returns ZoneOffset intead of int) * #getTimeZone -> #getTimeZoneId (return ZoneId instead of TimeZone) Change-Id: Ic55b2f442a40046ff0ed24f61f566fc7416471be
* | | [errorprone] SeparateClassloadertTestRunner: use #split(String,int)Ivan Frade2024-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Errorprone recommends to use String.split(String, int) as it has a less surprising behaviour with empty entries. https://errorprone.info/bugpattern/StringSplitter Change-Id: I48a01ee18d66bbb4a177aee576629dc5132d4a38
* | | Prepare 7.1.0-SNAPSHOT buildsMatthias Sohn2024-09-033-24/+24
|/ / | | | | | | Change-Id: Iba206a2d4645fc275cd2cd1cb3ae965b8ceafb28
* | Prepare 7.0.1-SNAPSHOT buildsMatthias Sohn2024-09-033-24/+24
| | | | | | | | Change-Id: I5a6a9e398d8b81bf7bd0afbd6c82116d4472a349
* | JGit v7.0.0.202409031743-rv7.0.0.202409031743-rMatthias Sohn2024-09-033-4/+4
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I86507936091e6f7af7588835722672ff2668a205
* | Revert "Remove deprecatedMatthias Sohn2024-09-031-1/+22
| | | | | | | | | | | | | | | | | | | | | | LocalDiskRepositoryTestCase#create(boolean,boolean)" This reverts commit 3682611cef41ade46cf5ac194f0674b46367a395. Reason: removing this deprecated method caused a ton of warnings about closing an already closed Repository when running tests. Change-Id: I3e9f224c55c167f92dad39caabfab5e43cf54cfb
* | Remove deprecated LocalDiskRepositoryTestCase#create(boolean,boolean)Matthias Sohn2024-09-031-22/+1
| | | | | | | | Change-Id: I9eff2d405b5302753ff2ec1d0eab431bdba69fe0
* | Prepare 7.0.0-SNAPSHOT buildsMatthias Sohn2024-08-283-4/+4
| | | | | | | | Change-Id: Ifa0a549e9551a2016241169e1c1e9052174c49d1
* | JGit v7.0.0.202408271414-rc1v7.0.0.202408271414-rc1Matthias Sohn2024-08-273-4/+4
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I969947a7c5fef72ed0c2f50e96a60787474f9906
* | Prepare 7.0.0-SNAPSHOT buildsMatthias Sohn2024-08-213-4/+4
| | | | | | | | Change-Id: I07b258a9f94823c9c390daf6e1d3034ca5ace81f
* | JGit v7.0.0.202408202050-m3Matthias Sohn2024-08-203-4/+4
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I44280658582c23ca0d9b85c4c24a1c2e7b82c6d8
* | JGit v7.0.0.202408201547-m3v7.0.0.202408201547-m3Matthias Sohn2024-08-203-4/+4
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Ic04bf96a04e38da82a7ff41334db44891f02419b
* | JGit v7.0.0.202409201410-m3v7.0.0.202409201410-m3Matthias Sohn2024-08-203-4/+4
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: If35e97f9fb415669bac6dfa10ac35b509b3ee921
* | Prepare 7.0.0-SNAPSHOT buildsMatthias Sohn2024-08-013-4/+4
| | | | | | | | Change-Id: Ic84217b6e8fb43e78b622883eb670ee135c75bbb
* | JGit v7.0.0.202407311305-m2v7.0.0.202407311305-m2Matthias Sohn2024-07-313-4/+4
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: If51ca5e1949fc825146145e45271207d07169474
* | Prepare 7.0.0-SNAPSHOT buildsMatthias Sohn2024-07-143-4/+4
| | | | | | | | Change-Id: I18015892edc81cd42456a6eacb49607930070be9
* | JGit v7.0.0.202407101547-m1v7.0.0.202407101547-m1Matthias Sohn2024-07-103-4/+4
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I80b799fc8f8d349ec3edb156e81593233013ae8b