diff src/org/tmatesoft/hg/repo/HgRepositoryLock.java @ 638:2f1cd1c26de5 smartgit-4.5

AIOOBE in HgManifest.RevisionMapper: provide more details about exception context. Create lock file atomically. Picked from changeset 8a5cdcb27b8f
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 07 Jun 2013 13:21:20 +0200
parents 3cd3c3d37432
children 5d8798772cca
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgRepositoryLock.java	Mon Apr 29 17:04:51 2013 +0200
+++ b/src/org/tmatesoft/hg/repo/HgRepositoryLock.java	Fri Jun 07 13:21:20 2013 +0200
@@ -120,7 +120,7 @@
 		do {
 			synchronized(this) {
 				try {
-					if (!lockFile.exists()) {
+					if (lockFile.createNewFile()) {
 						write(lockFile, bytes);
 						use++;
 						return;