comparison test/org/tmatesoft/hg/test/TestStatus.java @ 88:61eedab3eb3e

Status between two revisions to recognize copy/rename
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 26 Jan 2011 05:46:47 +0100
parents 658fa6b3a371
children d55d4eedfc57
comparison
equal deleted inserted replaced
87:25f2e5d1cd8b 88:61eedab3eb3e
44 44
45 public static void main(String[] args) throws Exception { 45 public static void main(String[] args) throws Exception {
46 HgRepository repo = new Lookup().detectFromWorkingDir(); 46 HgRepository repo = new Lookup().detectFromWorkingDir();
47 TestStatus test = new TestStatus(repo); 47 TestStatus test = new TestStatus(repo);
48 test.testLowLevel(); 48 test.testLowLevel();
49 test.testStatusCommand(); 49 // test.testStatusCommand();
50 } 50 }
51 51
52 public TestStatus(HgRepository hgRepo) { 52 public TestStatus(HgRepository hgRepo) {
53 repo = hgRepo; 53 repo = hgRepo;
54 statusParser = new StatusOutputParser(); 54 statusParser = new StatusOutputParser();
71 statusParser.reset(); 71 statusParser.reset();
72 eh.run("hg", "status", "-A", "--change", String.valueOf(revision)); 72 eh.run("hg", "status", "-A", "--change", String.valueOf(revision));
73 r = new StatusCollector.Record(); 73 r = new StatusCollector.Record();
74 new StatusCollector(repo).change(revision, r); 74 new StatusCollector(repo).change(revision, r);
75 report("status -A --change " + revision, r, statusParser); 75 report("status -A --change " + revision, r, statusParser);
76 //
77 statusParser.reset();
78 int rev2 = 80;
79 final String range = String.valueOf(revision) + ":" + String.valueOf(rev2);
80 eh.run("hg", "status", "-A", "--rev", range);
81 r = new StatusCollector(repo).status(revision, rev2);
82 report("Status -A -rev " + range, r, statusParser);
76 } 83 }
77 84
78 public void testStatusCommand() throws Exception { 85 public void testStatusCommand() throws Exception {
79 final StatusCommand sc = new StatusCommand(repo).all(); 86 final StatusCommand sc = new StatusCommand(repo).all();
80 StatusCollector.Record r; 87 StatusCollector.Record r;