diff cmdline/org/tmatesoft/hg/console/Main.java @ 525:0be5be8d57e9

Repository checkout support, first iteration
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 11 Jan 2013 18:12:39 +0100
parents 0ae5768081aa
children 2f9ed6bcefa2
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Main.java	Fri Jan 11 18:10:29 2013 +0100
+++ b/cmdline/org/tmatesoft/hg/console/Main.java	Fri Jan 11 18:12:39 2013 +0100
@@ -29,6 +29,7 @@
 
 import org.tmatesoft.hg.core.HgChangeset;
 import org.tmatesoft.hg.core.HgChangesetTreeHandler;
+import org.tmatesoft.hg.core.HgCheckoutCommand;
 import org.tmatesoft.hg.core.HgException;
 import org.tmatesoft.hg.core.HgFileRenameHandlerMixin;
 import org.tmatesoft.hg.core.HgFileRevision;
@@ -98,11 +99,12 @@
 
 	public static void main(String[] args) throws Exception {
 		Main m = new Main(args);
+		m.testCheckout();
 //		m.tryExtensions();
 //		m.dumpBookmarks();
 //		m.readConfigFile();
 //		m.dumpCommitLastMessage();
-		m.buildFileLog();
+//		m.buildFileLog();
 //		m.testConsoleLog();
 //		m.testTreeTraversal();
 //		m.testRevisionMap();
@@ -123,6 +125,11 @@
 //		m.bunchOfTests();
 	}
 	
+	private void testCheckout() throws Exception {
+		HgCheckoutCommand coCmd = new HgCheckoutCommand(hgRepo);
+		coCmd.changeset(17).execute();
+	}
+	
 	private void tryExtensions() throws Exception {
 		HgExtensionsManager em = hgRepo.getExtensions();
 		if (!em.isEnabled(HgExt.Rebase)) {
@@ -174,7 +181,7 @@
 	private void buildFileLog() throws Exception {
 		final long start = System.nanoTime();
 		HgLogCommand cmd = new HgLogCommand(hgRepo);
-		cmd.file("file1b.txt", true, true);
+		cmd.file("a2.txt", true, false);
 		final int[] count = new int[] { 0 };
 		class MyHandler implements HgChangesetTreeHandler, Adaptable {
 			public void treeElement(HgChangesetTreeHandler.TreeElement entry) {