diff src/org/tmatesoft/hg/repo/HgRepositoryLock.java @ 631:8a5cdcb27b8f

AIOOBE in HgManifest.RevisionMapper. Provide more details about exception context. Create lock file atomically. Test concurrent pull-rebase and read
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 30 May 2013 15:24:17 +0200
parents 5afc7eedb3dd
children 5d8798772cca
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgRepositoryLock.java	Thu May 23 19:44:28 2013 +0200
+++ b/src/org/tmatesoft/hg/repo/HgRepositoryLock.java	Thu May 30 15:24:17 2013 +0200
@@ -120,7 +120,7 @@
 		do {
 			synchronized(this) {
 				try {
-					if (!lockFile.exists()) {
+					if (lockFile.createNewFile()) {
 						write(lockFile, bytes);
 						use++;
 						return;