diff src/org/tmatesoft/hg/core/HgCommitCommand.java @ 705:b4242b7e7dfe

Merge command: implement conflict resolution alternatives
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 15 Aug 2013 18:43:50 +0200
parents 6526d8adbc0f
children 4ffc17c0b534
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgCommitCommand.java	Wed Aug 14 20:07:26 2013 +0200
+++ b/src/org/tmatesoft/hg/core/HgCommitCommand.java	Thu Aug 15 18:43:50 2013 +0200
@@ -20,7 +20,6 @@
 
 import java.io.IOException;
 
-import org.tmatesoft.hg.internal.COWTransaction;
 import org.tmatesoft.hg.internal.CommitFacility;
 import org.tmatesoft.hg.internal.CompleteRepoLock;
 import org.tmatesoft.hg.internal.FileContentSupplier;
@@ -112,7 +111,8 @@
 				newRevision = Nodeid.NULL;
 				return new Outcome(Kind.Failure, "nothing to add");
 			}
-			CommitFacility cf = new CommitFacility(Internals.getInstance(repo), parentRevs[0], parentRevs[1]);
+			final Internals implRepo = Internals.getInstance(repo);
+			CommitFacility cf = new CommitFacility(implRepo, parentRevs[0], parentRevs[1]);
 			for (Path m : status.getModified()) {
 				HgDataFile df = repo.getFileNode(m);
 				cf.add(df, new WorkingCopyContent(df));
@@ -131,7 +131,7 @@
 			}
 			cf.branch(detectBranch());
 			cf.user(detectUser());
-			Transaction.Factory trFactory = new COWTransaction.Factory();
+			Transaction.Factory trFactory = implRepo.getTransactionFactory();
 			Transaction tr = trFactory.create(repo);
 			try {
 				newRevision = cf.commit(message, tr);