diff cmdline/org/tmatesoft/hg/console/Main.java @ 197:3a7696fb457c

Investigate optimization options to allow fast processing of huge repositories. Fix defect in StatusCollector that lead to wrong result comparing first revision to empty repo (-1 to 0), due to same TIP constant value
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 19 Apr 2011 03:49:29 +0200
parents b413b16d10a5
children 8de327242aa0
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Main.java	Mon Apr 18 18:04:24 2011 +0200
+++ b/cmdline/org/tmatesoft/hg/console/Main.java	Tue Apr 19 03:49:29 2011 +0200
@@ -225,6 +225,15 @@
 		}
 	}
 
+	static void force_gc() {
+		Runtime.getRuntime().runFinalization();
+		Runtime.getRuntime().gc();
+		Thread.yield();
+		Runtime.getRuntime().runFinalization();
+		Runtime.getRuntime().gc();
+		Thread.yield();
+	}
+
 	private static class StatusDump implements HgStatusInspector {
 		public boolean hideStatusPrefix = false; // hg status -n option
 		public boolean showCopied = true; // -C