Skip to content

Commit 6d592b6

Browse files
committed
Issue #822: remove hg support
1 parent 52b4942 commit 6d592b6

12 files changed

+8
-131
lines changed

checkstyle-tester/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ you can download it from
2323
The tool runs Checkstyle through maven and makes use of your checkstyle branches,
2424
so maven and git is required to be installed as well.
2525
Depending on the type of external projects you wish to generate reports for,
26-
you may require other tools like Git or Mericural, for Git and HG repositories respectively.
26+
you may require other tools like Git or Mericural, for Git repositories respectively.
2727

2828
## Command Line Arguments
2929

checkstyle-tester/diff.groovy

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,6 @@ def getCommitSha(commitId, repoType, srcDestinationDir) {
332332
case 'git':
333333
cmd = "git rev-parse $commitId"
334334
break
335-
case 'hg':
336-
cmd = "hg identify --id $commitId"
337-
break
338335
default:
339336
throw new IllegalArgumentException("Error! Unknown $repoType repository.")
340337
}
@@ -349,9 +346,6 @@ def getCloneCmd(repoType, repoUrl, srcDestinationDir) {
349346
case 'git':
350347
cloneCmd = "git clone $repoUrl $srcDestinationDir"
351348
break
352-
case 'hg':
353-
cloneCmd = "hg clone $repoUrl $srcDestinationDir"
354-
break
355349
default:
356350
throw new IllegalArgumentException("Error! Unknown $repoType repository.")
357351
}
@@ -716,9 +710,6 @@ def getResetCmd(repoType, commitId) {
716710
case 'git':
717711
resetCmd = "git reset --hard $commitId"
718712
break
719-
case 'hg':
720-
resetCmd = "hg up $commitId"
721-
break
722713
default:
723714
throw new IllegalArgumentException("Error! Unknown $repoType repository.")
724715
}
@@ -731,9 +722,6 @@ def getLastProjectCommitSha(repoType, srcDestinationDir) {
731722
case 'git':
732723
cmd = "git rev-parse HEAD"
733724
break
734-
case 'hg':
735-
cmd = "hg id -i"
736-
break
737725
default:
738726
throw new IllegalArgumentException("Error! Unknown $repoType repository.")
739727
}

checkstyle-tester/github-action-projects1.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# List of GIT repositories to clone / pull for checking with Checkstyle
2-
# File format: REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
2+
# File format: REPO_NAME|[local|git]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
33
# Please note that bash comments works in this file
44

55
azure-maven-plugins|git|https://github.com/microsoft/azure-maven-plugins|develop|

checkstyle-tester/github-action-projects2.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# List of GIT repositories to clone / pull for checking with Checkstyle
2-
# File format: REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
2+
# File format: REPO_NAME|[local|git]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
33
# Please note that bash comments works in this file
44

55
jabref|git|https://github.com/JabRef/jabref|main|

checkstyle-tester/latest-projects-to-test-on.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# List of GIT repositories to clone / pull for checking with Checkstyle
2-
# File format: REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
2+
# File format: REPO_NAME|[local|git]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
33
# Please note that bash comments works in this file
44

55
guava-latest|git|https://github.com/google/guava|||

checkstyle-tester/launch.sh

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,8 @@ while read line ; do
5151
cd -
5252
fi
5353
else
54-
# esle is only hg (mercurial)
55-
if [ ! -d "$REPO_SOURCES_DIR" ]; then
56-
echo "Cloning $REPO_TYPE repository '${REPO_NAME}' to $REPO_SOURCES_DIR folder ..."
57-
hg clone $REPO_URL $REPO_SOURCES_DIR
58-
echo -e "Cloning $REPO_TYPE repository '$REPO_NAME' - completed\n"
59-
fi
60-
61-
if [ "$COMMIT_ID" != "" ]; then
62-
echo "Reseting $REPO_TYPE sources to commit '$COMMIT_ID'"
63-
cd $REPO_SOURCES_DIR
64-
hg up $COMMIT_ID
65-
cd -
66-
fi
67-
54+
echo "Unknown RepoType: $REPO_TYPE"
55+
exit 1
6856
fi
6957

7058
echo -e "$REPO_NAME is synchronized\n"

checkstyle-tester/launch_diff.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,6 @@ function launch {
184184
fi
185185

186186
CURRENT_REPO_DIR=$GITPATH
187-
elif [ "$REPO_TYPE" == "hg" ]; then
188-
HGPATH=$REPOSITORIES_DIR/$REPO_NAME
189-
190-
if [ ! -d "$HGPATH" ]; then
191-
echo "Cloning $REPO_TYPE repository '${REPO_NAME}' ..."
192-
hg clone $REPO_URL $HGPATH
193-
echo -e "Cloning $REPO_TYPE repository '$REPO_NAME' - completed"
194-
fi
195-
if [ "$COMMIT_ID" != "" ] && [ "$COMMIT_ID" != "master" ]; then
196-
echo "Reseting HG $REPO_TYPE sources to commit '$COMMIT_ID'"
197-
cd $HGPATH
198-
hg up $COMMIT_ID
199-
cd -
200-
fi
201-
202-
CURRENT_REPO_DIR=$HGPATH
203187
else
204188
echo "Unknown RepoType: $REPO_TYPE"
205189
exit 1

checkstyle-tester/launch_diff_antlr.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,6 @@ function launch {
118118
fi
119119

120120
REPO_SOURCES_DIR=$GITPATH
121-
elif [ "$REPO_TYPE" == "hg" ]; then
122-
HGPATH=$REPOSITORIES_DIR/$REPO_NAME
123-
124-
if [ ! -d "$HGPATH" ]; then
125-
echo "Cloning $REPO_TYPE repository '${REPO_NAME}' ..."
126-
hg clone $REPO_URL $HGPATH
127-
echo -e "Cloning $REPO_TYPE repository '$REPO_NAME' - completed"
128-
fi
129-
if [ "$COMMIT_ID" != "" ] && [ "$COMMIT_ID" != "master" ]; then
130-
echo "Reseting HG $REPO_TYPE sources to commit '$COMMIT_ID'"
131-
cd $HGPATH
132-
hg up $COMMIT_ID
133-
cd -
134-
fi
135-
136-
REPO_SOURCES_DIR=$HGPATH
137121
else
138122
echo "Unknown RepoType: $REPO_TYPE"
139123
exit 1

checkstyle-tester/projects-to-test-on-for-github-action.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# List of GIT repositories to clone / pull for checking with Checkstyle
2-
# File format: REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
2+
# File format: REPO_NAME|[local|git]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
33
# Please note that bash comments works in this file
44

55
# Few projects that delivers set of unusual Java constructions that shall be correctly handled by AST visitor

checkstyle-tester/projects-to-test-on.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# List of GIT repositories to clone / pull for checking with Checkstyle
2-
# File format: REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
2+
# File format: REPO_NAME|[local|git]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]
33
# Please note that bash comments works in this file
44

55
# Few projects that delivers set of unusual Java constructions that shall be correctly handled by AST visitor

0 commit comments

Comments
 (0)