Git clone of a source code into a parent C project doesn't appear to work? [message #1849605] |
Wed, 26 January 2022 11:34  |
Eclipse User |
|
|
|
I have an Eclipse plug-in that clones a C source with org.eclipse.egit.core.op.run() into a parent project C it creates for handling build output. It then imports C source into the parent C project it via org.eclipse.egit.ui.internal.clone.createProjects(). I can see the source code in the Eclipse Package Explorer and Git perspective. However, modified files aren't marked with ">" in front of the filename? Is this a valid scenario? I've inherited this code and am not sure it ever worked?
|
|
|
|
|
|
|
Re: Git clone of a source code into a parent C project doesn't appear to work? [message #1849649 is a reply to message #1849640] |
Thu, 27 January 2022 13:52   |
Eclipse User |
|
|
|
Thanks, Thomas. The clone is below:
CloneOperation operation = new CloneOperation(uri, true, null, trgFile, branch, "origin", 10000);
try {
operation.addPostCloneTask(new PostCloneTask() {
public void execute(Repository repository, IProgressMonitor monitor) throws CoreException {
localRepositories.add(repository.getDirectory().getAbsolutePath());
options.put(GitSCMWizardPage.KEY_SELECTED_LOCAL_REPOS, localRepositories);
}
});
operation.run(monitor);
} catch (InvocationTargetException e) {
...
}
Here is the import:
private void importProjects(IProgressMonitor monitor) throws IOException, InvocationTargetException,
InterruptedException
{
Repository repo = getTargetRepository(rootDirectory);
Set<ProjectRecord> projectsToCreate = getProjectRecords();
ProjectUtils.createProjects(projectsToCreate, true,null, monitor);
boolean isEclipseLunaRelease = false;
}
FWIW, I saw your Obligatory cautionary note. This code is old and appears very fragile. I'm not surprised it isn't working.
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05298 seconds