Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/TestStatus.java @ 76:658fa6b3a371
Fixed a defect when a file added and removed past some revision was reported as R for status against that rev
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 24 Jan 2011 04:38:09 +0100 |
parents | e62f9638fb27 |
children | 61eedab3eb3e |
comparison
equal
deleted
inserted
replaced
75:e62f9638fb27 | 76:658fa6b3a371 |
---|---|
30 import org.tmatesoft.hg.repo.StatusCollector; | 30 import org.tmatesoft.hg.repo.StatusCollector; |
31 import org.tmatesoft.hg.repo.WorkingCopyStatusCollector; | 31 import org.tmatesoft.hg.repo.WorkingCopyStatusCollector; |
32 | 32 |
33 | 33 |
34 /** | 34 /** |
35 * | 35 * |
36 * @author Artem Tikhomirov | 36 * @author Artem Tikhomirov |
37 * @author TMate Software Ltd. | 37 * @author TMate Software Ltd. |
38 */ | 38 */ |
39 public class TestStatus { | 39 public class TestStatus { |
40 | 40 |
95 report("status -A --change " + revision, r, statusParser); | 95 report("status -A --change " + revision, r, statusParser); |
96 | 96 |
97 // TODO check not -A, but defaults()/custom set of modifications | 97 // TODO check not -A, but defaults()/custom set of modifications |
98 } | 98 } |
99 | 99 |
100 public void testRemovedAgainstNonTip() { | |
101 /* | |
102 status --rev N when a file added past revision N was removed ((both physically and in dirstate), but not yet committed | |
103 | |
104 Reports extra REMOVED file (the one added and removed in between). Shall not | |
105 */ | |
106 } | |
107 | |
100 private static void report(String what, StatusCollector.Record r, StatusOutputParser statusParser) { | 108 private static void report(String what, StatusCollector.Record r, StatusOutputParser statusParser) { |
101 System.out.println(">>>" + what); | 109 System.out.println(">>>" + what); |
102 reportNotEqual("MODIFIED", r.getModified(), statusParser.getModified()); | 110 reportNotEqual("MODIFIED", r.getModified(), statusParser.getModified()); |
103 reportNotEqual("ADDED", r.getAdded(), statusParser.getAdded()); | 111 reportNotEqual("ADDED", r.getAdded(), statusParser.getAdded()); |
104 reportNotEqual("REMOVED", r.getRemoved(), statusParser.getRemoved()); | 112 reportNotEqual("REMOVED", r.getRemoved(), statusParser.getRemoved()); |