Skip to content

Commit 2cc5440

Browse files
committed
Drop support for mercurial
1 parent e08e12c commit 2cc5440

File tree

11 files changed

+40
-46
lines changed

11 files changed

+40
-46
lines changed

History.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## New and Noteworthy
44

5+
* Support for Mercurial is removed. The only SCM supported in the project-list.xml is "git".
6+
57
## Fixed Issues
68

79
## External Contributions

config/projectlist_1_2_0.xsd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<xs:simpleType>
1717
<xs:restriction base="xs:string">
1818
<xs:enumeration value="git"/>
19-
<xs:enumeration value="hg"/>
2019
</xs:restriction>
2120
</xs:simpleType>
2221
</xs:element>

lib/pmdtester/builders/project_builder.rb

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ def clone_projects
2222
if File.exist?(path)
2323
logger.warn "Skipping clone, project path #{path} already exists"
2424
else
25-
clone_cmd = "#{project.type} clone #{project.connection} #{path}"
26-
27-
if project.type == 'git'
28-
# Don't download whole history
29-
# Note we don't use --single-branch, because the repo is downloaded
30-
# once but may be used with several tags.
31-
clone_cmd += ' --depth 1'
32-
end
25+
raise "Unsupported project type '#{project.type}' - only git is supported" unless project.type == 'git'
26+
27+
# git:
28+
# Don't download whole history
29+
# Note we don't use --single-branch, because the repo is downloaded
30+
# once but may be used with several tags.
31+
clone_cmd = "git clone #{project.connection} #{path} --depth 1"
32+
3333
Cmd.execute(clone_cmd)
3434
end
3535

@@ -95,12 +95,9 @@ def run_as_script(path, command)
9595
end
9696

9797
def execute_reset_cmd(type, tag)
98-
case type
99-
when 'git'
100-
reset_cmd = "git checkout #{tag}; git reset --hard #{tag}"
101-
when 'hg'
102-
reset_cmd = "hg up #{tag}"
103-
end
98+
raise "Unsupported project type '#{type}' - only git is supported" unless type == 'git'
99+
100+
reset_cmd = "git checkout #{tag}; git reset --hard #{tag}"
104101

105102
Cmd.execute(reset_cmd)
106103
end

test/resources/html_report_builder/expected_empty_diff_report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>Diff report for openjdk10</title>
5+
<title>Diff report for openjdk-11</title>
66

77
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
88
<link rel="stylesheet" type="text/css" href="../css/datatables.min.css"/>

test/resources/integration_test_runner/project-list.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,4 @@ xsi:noNamespaceSchemaLocation="projectlist_1_2_0.xsd">
2323
<tag>v5.0.6.RELEASE</tag>
2424
</project>
2525
-->
26-
27-
<!---<project>
28-
<name>openjdk10</name>
29-
<type>hg</type>
30-
<connection>http://hg.openjdk.java.net/jdk10/jdk10/jdk</connection>
31-
<webview-url>http://hg.openjdk.java.net/jdk10/jdk10/jdk/file/777356696811</webview-url>
32-
</project> -->
3326
</projectlist>

test/resources/project_diff_report/project-list.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ xsi:noNamespaceSchemaLocation="projectlist_1_2_0.xsd">
1616
</project>
1717

1818
<project>
19-
<name>openjdk10</name>
20-
<type>hg</type>
21-
<connection>http://hg.openjdk.java.net/jdk10/jdk10/jdk</connection>
22-
<webview-url>http://hg.openjdk.java.net/jdk10/jdk10/jdk/file/777356696811</webview-url>
19+
<name>openjdk-11</name>
20+
<type>git</type>
21+
<connection>https://github.com/openjdk/jdk</connection>
22+
<tag>jdk-11+28</tag>
23+
<src-subpath>src/java.base</src-subpath>
2324
</project>
2425

2526
<project>

test/resources/projects_parser/project-list.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ xsi:noNamespaceSchemaLocation="projectlist_1_2_0.xsd">
1616
</project>
1717

1818
<project>
19-
<name>openjdk10</name>
20-
<type>hg</type>
21-
<connection>http://hg.openjdk.java.net/jdk10/jdk10/jdk</connection>
22-
<webview-url>http://hg.openjdk.java.net/jdk10/jdk10/jdk/file/777356696811</webview-url>
19+
<name>openjdk-11</name>
20+
<type>git</type>
21+
<connection>https://github.com/openjdk/jdk</connection>
22+
<tag>jdk-11+28</tag>
23+
<src-subpath>src/java.base</src-subpath>
2324
</project>
2425

2526
<project>

test/resources/summary_report_builder/expected_filtered_index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ <h2>Projects</h2>
112112
</tr>
113113

114114
<tr>
115-
<td class="project-header"><a href="./openjdk10/index.html">openjdk10</a></td>
116-
<td>master</td>
115+
<td class="project-header"><a href="./openjdk-11/index.html">openjdk-11</a></td>
116+
<td>jdk-11+28</td>
117117
<td>
118118
<span class="pill badge-pill badge-secondary added">+0</span>
119119
<span class="pill badge-pill badge-secondary removed">-0</span>

test/resources/summary_report_builder/expected_index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ <h2>Projects</h2>
110110
</tr>
111111

112112
<tr>
113-
<td class="project-header"><a href="./openjdk10/index.html">openjdk10</a></td>
114-
<td>master</td>
113+
<td class="project-header"><a href="./openjdk-11/index.html">openjdk-11</a></td>
114+
<td>jdk-11+28</td>
115115
<td>
116116
<span class="pill badge-pill badge-secondary added">+0</span>
117117
<span class="pill badge-pill badge-secondary removed">-0</span>

test/resources/summary_report_builder/project-list.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ xsi:noNamespaceSchemaLocation="projectlist_1_2_0.xsd">
1616
</project>
1717

1818
<project>
19-
<name>openjdk10</name>
20-
<type>hg</type>
21-
<connection>http://hg.openjdk.java.net/jdk10/jdk10/jdk</connection>
22-
<webview-url>http://hg.openjdk.java.net/jdk10/jdk10/jdk/file/777356696811</webview-url>
19+
<name>openjdk-11</name>
20+
<type>git</type>
21+
<connection>https://github.com/openjdk/jdk</connection>
22+
<tag>jdk-11+28</tag>
23+
<src-subpath>src/java.base</src-subpath>
2324
</project>
2425

2526
<project>

0 commit comments

Comments
 (0)