@Before
public void setUp() throws Exception {
workdir = testUtils.createTempDir("Repository1");
repository1 = new TestRepository(new File(workdir, Constants.DOT_GIT));
// now we create a project in repo1
project = testUtils
.createProjectInLocalFileSystem(workdir, projectName);
testUtils.addFileToProject(project, "folder1/file1.txt", "Hello world 1");
testUtils.addFileToProject(project, "folder1/file2.txt", "Hello world 2");
repository1.connect(project);
repository1.trackAllFiles(project);
repository1.commit("Initial commit");
File workdir2 = testUtils.createTempDir("Project2");
// Project location is at root of repository
project2 = testUtils.createProjectInLocalFileSystem(workdir2.getParentFile(), "Project2");
testUtils.addFileToProject(project2, "file.txt", "initial");
repository2 = new TestRepository(new File(workdir2, Constants.DOT_GIT));
repository2.connect(project2);
repository2.trackAllFiles(project2);
repository2.commit("Initial commit");
}