diff cmdline/org/tmatesoft/hg/console/Main.java @ 526:2f9ed6bcefa2

Initial support for Revert command with accompanying minor refactoring
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 15 Jan 2013 17:07:19 +0100
parents 0be5be8d57e9
children 88afffd39899
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Main.java	Fri Jan 11 18:12:39 2013 +0100
+++ b/cmdline/org/tmatesoft/hg/console/Main.java	Tue Jan 15 17:07:19 2013 +0100
@@ -36,6 +36,7 @@
 import org.tmatesoft.hg.core.HgLogCommand;
 import org.tmatesoft.hg.core.HgManifestCommand;
 import org.tmatesoft.hg.core.HgManifestHandler;
+import org.tmatesoft.hg.core.HgRevertCommand;
 import org.tmatesoft.hg.core.Nodeid;
 import org.tmatesoft.hg.internal.BasicSessionContext;
 import org.tmatesoft.hg.internal.ByteArrayChannel;
@@ -99,7 +100,8 @@
 
 	public static void main(String[] args) throws Exception {
 		Main m = new Main(args);
-		m.testCheckout();
+		m.testRevert();
+//		m.testCheckout();
 //		m.tryExtensions();
 //		m.dumpBookmarks();
 //		m.readConfigFile();
@@ -125,6 +127,11 @@
 //		m.bunchOfTests();
 	}
 	
+	private void testRevert() throws Exception {
+		HgRevertCommand cmd = new HgRevertCommand(hgRepo);
+		cmd.file(Path.create("a.txt")).execute();
+	}
+	
 	private void testCheckout() throws Exception {
 		HgCheckoutCommand coCmd = new HgCheckoutCommand(hgRepo);
 		coCmd.changeset(17).execute();