Skip to content

Commit 74345ac

Browse files
committed
duplicate key value JDBC exception when indexing large Mercurial repo
fixes #683
1 parent 4fd421f commit 74345ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/org/opensolaris/opengrok/history/MercurialHistoryParser.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ public void processStream(InputStream input) throws IOException {
155155
*/
156156
String[] move = part.split(" \\(");
157157
File f = new File(mydir + move[0]);
158-
if (!move[0].isEmpty() && f.exists()) {
159-
renamedFiles.add(move[0]);
158+
if (!move[0].isEmpty() && f.exists() &&
159+
!renamedFiles.contains(move[0])) {
160+
renamedFiles.add(move[0]);
160161
}
161162
}
162163

0 commit comments

Comments
 (0)