Skip to content

Commit bcc38a4

Browse files
authored
Require Jenkins 2.504.3 or newer (jenkinsci#1796)
* Remove whatchanged references Git 2.51 has deprecated whatchanged https://github.blog/open-source/git/highlights-from-git-2-51/ https://issues.jenkins.io/browse/JENKINS-76004 describes the change.
1 parent 2d7a301 commit bcc38a4

File tree

4 files changed

+5
-25
lines changed

4 files changed

+5
-25
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.jenkins-ci.plugins</groupId>
77
<artifactId>plugin</artifactId>
8-
<version>5.23</version>
8+
<version>5.24</version>
99
<relativePath />
1010
</parent>
1111

@@ -39,7 +39,7 @@
3939
<hpi.strictBundledArtifacts>true</hpi.strictBundledArtifacts>
4040
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
4141
<jenkins.baseline>2.504</jenkins.baseline>
42-
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
42+
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
4343
<no-test-jar>false</no-test-jar>
4444
<!-- Do not run extra reporting for pmd -->
4545
<!-- https://stackoverflow.com/questions/12038238/unable-to-locate-source-xref-to-link-to -->

src/main/java/hudson/plugins/git/GitChangeSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public GitChangeSet(List<String> lines, boolean authorOrCommitter, boolean retai
129129
parseCommit(lines);
130130
}
131131

132-
// Nearly ISO dates generated by git whatchanged --format=+ci
132+
// Nearly ISO dates generated by git log --format=+%ci
133133
// Look like '2015-09-30 08:21:24 -0600'
134134
// ISO is '2015-09-30T08:21:24-06:00'
135135
// Uses Builder rather than format pattern for more reliable parsing

src/test/java/hudson/plugins/git/GitChangeSetPluginHistoryTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,6 @@ public class GitChangeSetPluginHistoryTest {
4545
@ClassRule
4646
public static GitSampleRepoRule sampleRepo = new GitSampleRepoRule();
4747

48-
/* git 1.7.1 on CentOS 6.7 "whatchanged" generates no output for
49-
* the SHA1 hashes (from this repository) in this list. Rather
50-
* than skip testing on that old git version, this exclusion list
51-
* allows most tests to run. Debian 6 / git 1.7.2.5 also has the issue.
52-
*/
53-
private static final String[] git171exceptions = {
54-
"6e467b23",
55-
"750b6806",
56-
"7eeb070b",
57-
"87988f4d",
58-
"94d982c2",
59-
"a571899e",
60-
"b9e497b0",
61-
"bc71cd2d",
62-
"bca98ea9",
63-
"c73b4ff3",
64-
"dcd329f4",
65-
"edf066f3",
66-
};
67-
6848
public GitChangeSetPluginHistoryTest(GitClient git, boolean authorOrCommitter, String sha1String) throws Exception {
6949
this.sha1 = ObjectId.fromString(sha1String);
7050
StringWriter stringWriter = new StringWriter();

src/test/java/hudson/plugins/git/GitChangeSetTimestampTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
/**
1616
* JENKINS-30073 reports that the timestamp returns -1 for the typical timestamp
17-
* reported by the +%ci format to git log and git whatchanged. This test
17+
* reported by the +%ci format to git log. This test
1818
* duplicates the bug and tests many other date formatting cases.
1919
* See JENKINS-55693 for more details on joda time replacement.
2020
*
@@ -37,7 +37,7 @@ public GitChangeSetTimestampTest(String timestamp, String normalizedTimestamp, l
3737
@Parameterized.Parameters(name = "{0}")
3838
public static Collection createSampleChangeSets() {
3939
Object[][] samples = {
40-
/* git whatchanged dates from various time zones, months, & days */
40+
/* git log dates from various time zones, months, & days */
4141
{"2015-10-06 19:29:47 +0300", null, 1444148987000L},
4242
{"2017-10-23 23:43:29 +0100", null, 1508798609000L},
4343
{"2017-09-21 17:35:24 -0400", null, 1506029724000L},

0 commit comments

Comments
 (0)