Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/TestRevert.java @ 529:95bdcf75e71e
Command to schedule addition/removal of repository files
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 21 Jan 2013 19:41:51 +0100 |
parents | 47b7bedf0569 |
children | 2813a26b8999 |
comparison
equal
deleted
inserted
replaced
528:f7fbf48b9383 | 529:95bdcf75e71e |
---|---|
74 errorCollector.assertTrue(statusParser.getClean().contains(targetFile)); | 74 errorCollector.assertTrue(statusParser.getClean().contains(targetFile)); |
75 errorCollector.assertEquals(1, statusParser.getUnknown().size()); | 75 errorCollector.assertEquals(1, statusParser.getUnknown().size()); |
76 errorCollector.assertEquals(targetFile.toString() + ".orig", statusParser.getUnknown().get(0).toString()); | 76 errorCollector.assertEquals(targetFile.toString() + ".orig", statusParser.getUnknown().get(0).toString()); |
77 } | 77 } |
78 | 78 |
79 private static void modifyFileAppend(File f) throws Exception { | 79 private static void modifyFileAppend(File f) throws IOException { |
80 assertTrue(f.isFile()); | 80 assertTrue(f.isFile()); |
81 FileOutputStream fos = new FileOutputStream(f, true); | 81 FileOutputStream fos = new FileOutputStream(f, true); |
82 fos.write("XXX".getBytes()); | 82 fos.write("XXX".getBytes()); |
83 fos.close(); | 83 fos.close(); |
84 } | |
85 | |
86 static File cloneRepoToTempLocation(String configRepoName, String name, boolean noupdate) throws Exception, InterruptedException { | |
87 return cloneRepoToTempLocation(Configuration.get().find(configRepoName), name, noupdate); | |
84 } | 88 } |
85 | 89 |
86 static File cloneRepoToTempLocation(HgRepository repo, String name, boolean noupdate) throws IOException, InterruptedException { | 90 static File cloneRepoToTempLocation(HgRepository repo, String name, boolean noupdate) throws IOException, InterruptedException { |
87 File testRepoLoc = TestIncoming.createEmptyDir(name); | 91 File testRepoLoc = TestIncoming.createEmptyDir(name); |
88 ExecHelper eh = new ExecHelper(new OutputParser.Stub(), testRepoLoc.getParentFile()); | 92 ExecHelper eh = new ExecHelper(new OutputParser.Stub(), testRepoLoc.getParentFile()); |