annotate test/org/tmatesoft/hg/test/TestCheckout.java @ 536:2813a26b8999

Tests: refactor various utility methods to a single location
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 05 Feb 2013 16:36:58 +0100
parents 47b7bedf0569
children ca56a36c2eea
rev   line source
526
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
1 /*
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
2 * Copyright (c) 2013 TMate Software Ltd
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
3 *
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
6 * the Free Software Foundation; version 2 of the License.
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
7 *
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
8 * This program is distributed in the hope that it will be useful,
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
11 * GNU General Public License for more details.
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
12 *
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
13 * For information on how to redistribute this software under
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
14 * the terms of a license other than GNU General Public License
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
15 * contact TMate Software at support@hg4j.com
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
16 */
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
17 package org.tmatesoft.hg.test;
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
18
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
19 import static org.junit.Assert.assertEquals;
536
2813a26b8999 Tests: refactor various utility methods to a single location
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 527
diff changeset
20 import static org.tmatesoft.hg.test.RepoUtils.cloneRepoToTempLocation;
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
21
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
22 import java.io.File;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
23 import java.io.FileFilter;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
24
526
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
25 import org.junit.Assert;
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
26 import org.junit.Rule;
526
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
27 import org.junit.Test;
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
28 import org.tmatesoft.hg.core.HgCheckoutCommand;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
29 import org.tmatesoft.hg.core.Nodeid;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
30 import org.tmatesoft.hg.repo.HgLookup;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
31 import org.tmatesoft.hg.repo.HgRepository;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
32 import org.tmatesoft.hg.util.Pair;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
33 import org.tmatesoft.hg.util.Path;
526
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
34
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
35 /**
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
36 *
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
37 * @author Artem Tikhomirov
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
38 * @author TMate Software Ltd.
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
39 */
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
40 public class TestCheckout {
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
41
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
42 @Rule
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
43 public ErrorCollectorExt errorCollector = new ErrorCollectorExt();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
44
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
45 private HgRepository repo;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
46 private ExecHelper eh;
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
47
526
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
48
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
49 @Test
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
50 public void testCleanCheckoutInEmptyDir() throws Exception {
536
2813a26b8999 Tests: refactor various utility methods to a single location
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 527
diff changeset
51 File testRepoLoc = cloneRepoToTempLocation("log-1", "test-checkoutClean", true);
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
52 repo = new HgLookup().detect(testRepoLoc);
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
53 // nothing but .hg dir
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
54 assertEquals("[sanity]", 0, testRepoLoc.listFiles(new FilesOnlyFilter()).length);
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
55
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
56 new HgCheckoutCommand(repo).changeset(1).execute();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
57 errorCollector.assertEquals(2, testRepoLoc.listFiles(new FilesOnlyFilter()).length);
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
58
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
59 Pair<Nodeid, Nodeid> workingCopyParents = repo.getWorkingCopyParents();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
60 errorCollector.assertEquals("da3461cd828dae8eb5fd11189d40e9df1961f191", workingCopyParents.first().toString());
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
61 errorCollector.assertEquals(Nodeid.NULL, workingCopyParents.second());
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
62 errorCollector.assertEquals(HgRepository.DEFAULT_BRANCH_NAME, repo.getWorkingCopyBranchName());
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
63
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
64 StatusOutputParser statusOutputParser = new StatusOutputParser();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
65 eh = new ExecHelper(statusOutputParser, testRepoLoc);
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
66 eh.run("hg", "status", "-A");
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
67 errorCollector.assertEquals(2, statusOutputParser.getClean().size());
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
68 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("a")));
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
69 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("b")));
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
70
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
71 new HgCheckoutCommand(repo).changeset(3).execute();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
72 statusOutputParser.reset();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
73 eh.run("hg", "status", "-A");
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
74 errorCollector.assertEquals(3, statusOutputParser.getClean().size());
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
75 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("b")));
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
76 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("d")));
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
77 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("dir/b")));
526
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
78 }
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
79
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
80 @Test
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
81 public void testCleanCheckoutInDirtyDir() {
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
82 Assert.fail("Make sure WC is cleared prior to clean checkout");
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
83 }
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
84
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
85 @Test
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
86 public void testBranchCheckout() throws Exception {
536
2813a26b8999 Tests: refactor various utility methods to a single location
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 527
diff changeset
87 File testRepoLoc = cloneRepoToTempLocation("log-branches", "test-checkoutBranch", true);
527
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
88 repo = new HgLookup().detect(testRepoLoc);
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
89
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
90 new HgCheckoutCommand(repo).changeset(3 /*branch test*/).execute();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
91
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
92 StatusOutputParser statusOutputParser = new StatusOutputParser();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
93 eh = new ExecHelper(statusOutputParser, testRepoLoc);
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
94 eh.run("hg", "status", "-A");
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
95 errorCollector.assertEquals(3, statusOutputParser.getClean().size());
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
96 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("a")));
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
97 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("b")));
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
98 errorCollector.assertTrue(statusOutputParser.getClean().contains(Path.create("c")));
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
99
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
100 errorCollector.assertEquals("test", repo.getWorkingCopyBranchName());
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
101 }
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
102
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
103 private static final class FilesOnlyFilter implements FileFilter {
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
104 public boolean accept(File f) {
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
105 return f.isFile();
47b7bedf0569 Tests for present HgCheckoutCommand functionality. Update branch information on checkout. Use UTF8 encoding for the branch file
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 526
diff changeset
106 }
526
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
107 }
2f9ed6bcefa2 Initial support for Revert command with accompanying minor refactoring
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
108 }