Move prepareSecondRepository method to base hg test class

This commit is contained in:
Nadya.Zabrodina
2013-05-15 17:53:22 +04:00
parent d1f65e098f
commit e36a28c7fc
2 changed files with 11 additions and 10 deletions
@@ -115,4 +115,15 @@ public abstract class HgPlatformTest extends UsefulTestCase {
hg("add file.txt");
hg("commit -m initial");
}
public void prepareSecondRepository() throws IOException {
cd(myRepository);
hg("clone " + myRepository.getCanonicalPath() + " childRepo");
myChildRepo = myRepository.findChild("childRepo");
cd(myChildRepo);
hg("pull");
hg("update");
HgTestUtil.updateDirectoryMappings(myProject, myRepository);
HgTestUtil.updateDirectoryMappings(myProject, myChildRepo);
}
}
@@ -191,14 +191,4 @@ public class HgMergeProviderTest extends HgPlatformTest {
Assert.assertEquals(s, new String(bytes));
}
private void prepareSecondRepository() throws IOException {
cd(myRepository);
hg("clone " + myRepository.getCanonicalPath() + " childRepo");
myChildRepo = myRepository.findChild("childRepo");
cd(myChildRepo);
hg("pull");
hg("update");
HgTestUtil.updateDirectoryMappings(myProject, myRepository);
HgTestUtil.updateDirectoryMappings(myProject, myChildRepo);
}
}