Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/ComplexTest.java @ 636:ffce73efa2c2
HgCommitCommand: save last commit message
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 06 Jun 2013 19:39:06 +0200 |
parents | 4ec2d44e2bf3 |
children | 4a0bab2c6da1 |
comparison
equal
deleted
inserted
replaced
635:4ec2d44e2bf3 | 636:ffce73efa2c2 |
---|---|
39 | 39 |
40 @Rule | 40 @Rule |
41 public ErrorCollectorExt errorCollector = new ErrorCollectorExt(); | 41 public ErrorCollectorExt errorCollector = new ErrorCollectorExt(); |
42 | 42 |
43 /** | 43 /** |
44 * Regular work sequence with checkout, add, remove, and commit | 44 * Regular work sequence with checkout, add, remove, revert and commit |
45 */ | 45 */ |
46 @Test | 46 @Test |
47 public void testLocalScenario1() throws Exception { | 47 public void testLocalScenario1() throws Exception { |
48 File repoLoc = RepoUtils.createEmptyDir("composite-scenario-1"); | 48 File repoLoc = RepoUtils.createEmptyDir("composite-scenario-1"); |
49 // init empty | 49 // init empty |
68 fileB.delete(); | 68 fileB.delete(); |
69 // TODO HgAddRemoveCommand needs #copy(from, to) method | 69 // TODO HgAddRemoveCommand needs #copy(from, to) method |
70 new HgAddRemoveCommand(hgRepo).add(fc).remove(fb).execute(); | 70 new HgAddRemoveCommand(hgRepo).add(fc).remove(fb).execute(); |
71 new HgCommitCommand(hgRepo).message("SECOND").execute(); | 71 new HgCommitCommand(hgRepo).message("SECOND").execute(); |
72 // | 72 // |
73 // TODO hgRepo.getCommitLastMessage() shall be updated from HgCommitCommand | |
74 assertEquals(2, hgRepo.getChangelog().getRevisionCount()); | 73 assertEquals(2, hgRepo.getChangelog().getRevisionCount()); |
74 errorCollector.assertEquals("SECOND", hgRepo.getCommitLastMessage()); | |
75 // checkout previous version | 75 // checkout previous version |
76 new HgCheckoutCommand(hgRepo).changeset(0).clean(true).execute(); | 76 new HgCheckoutCommand(hgRepo).changeset(0).clean(true).execute(); |
77 assertTrue(fileA.isFile()); | 77 assertTrue(fileA.isFile()); |
78 assertTrue(fileB.isFile()); | 78 assertTrue(fileB.isFile()); |
79 assertFalse(fileC.isFile()); | 79 assertFalse(fileC.isFile()); |