Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langer2019-01-09 04:28:20 -0500
committerPhilip Langer2019-01-09 05:39:15 -0500
commita309ac1e461e8f2ae30dbbc9e5918ba9e12669ad (patch)
treeffb6cc1e50259f5208e5a4e9fa80a23027d68263
parent2f639210b1a82189d84f160e87fc3d9a1e0c250b (diff)
downloadorg.eclipse.emf.compare-a309ac1e461e8f2ae30dbbc9e5918ba9e12669ad.tar.gz
org.eclipse.emf.compare-a309ac1e461e8f2ae30dbbc9e5918ba9e12669ad.tar.xz
org.eclipse.emf.compare-a309ac1e461e8f2ae30dbbc9e5918ba9e12669ad.zip
[543292] Make GitTestSupport compatible with EGit 5.2
Bug: 543292 Change-Id: Ic3ad1bd04c0c2e38a1a5f4e417ef58455c2d05f1 Signed-off-by: Philip Langer <planger@eclipsesource.com>
-rw-r--r--plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/egit_ide_ui_messages.properties1
-rw-r--r--plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/merge/ModelGitMergeEditorInput.java9
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/GitTestSupport.java2
3 files changed, 8 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/egit_ide_ui_messages.properties b/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/egit_ide_ui_messages.properties
index 9b2ad5bcb..4a4f72384 100644
--- a/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/egit_ide_ui_messages.properties
+++ b/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/egit_ide_ui_messages.properties
@@ -14,6 +14,7 @@
GitMergeEditorInput_OutOfWSResources = Some of the conflicting resources were not in the workspace. Please manually use the merge tool on the offending files.
GitMergeEditorInput_MultipleModels = There are multiple models involved in this conflict. Please manually use the merge tool on all distinct files.
+ValidationUtils_CanNotResolveRefMessage = Cannot resolve {0}
post.merge.dialog.title = Stage Merged Files
post.merge.dialog.text = All merge conflicts in the current model have been resolved. Do you want to stage the containing resources, marking the conflicting files as resolved?
diff --git a/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/merge/ModelGitMergeEditorInput.java b/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/merge/ModelGitMergeEditorInput.java
index f90068e0c..ed5352fae 100644
--- a/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/merge/ModelGitMergeEditorInput.java
+++ b/plugins/org.eclipse.emf.compare.egit.ui/src/org/eclipse/emf/compare/egit/ui/internal/merge/ModelGitMergeEditorInput.java
@@ -432,7 +432,9 @@ public class ModelGitMergeEditorInput extends CompareEditorInput {
}
ObjectId mergeHead = repository.resolve(target);
if (mergeHead == null) {
- throw new IOException(NLS.bind(UIText.ValidationUtils_CanNotResolveRefMessage, target));
+ throw new IOException(NLS.bind(
+ EMFCompareEGitUIMessages.getString("ValidationUtils_CanNotResolveRefMessage"), //$NON-NLS-1$
+ target));
}
return revWalk.parseCommit(mergeHead);
} catch (IOException e) {
@@ -444,8 +446,9 @@ public class ModelGitMergeEditorInput extends CompareEditorInput {
try {
ObjectId head = repository.resolve(Constants.HEAD);
if (head == null) {
- throw new IOException(
- NLS.bind(UIText.ValidationUtils_CanNotResolveRefMessage, Constants.HEAD));
+ throw new IOException(NLS.bind(
+ EMFCompareEGitUIMessages.getString("ValidationUtils_CanNotResolveRefMessage"), //$NON-NLS-1$
+ Constants.HEAD));
}
return revWalk.parseCommit(head);
} catch (IOException e) {
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/GitTestSupport.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/GitTestSupport.java
index 03b9bdcea..2a9d10592 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/GitTestSupport.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/GitTestSupport.java
@@ -423,7 +423,7 @@ public class GitTestSupport extends InternalGitTestSupport {
reset.execute(null);
BranchOperation op = new BranchOperation(getRepository(), normalizeBranch(refName));
op.execute(null);
- CheckoutResult result = op.getResult();
+ CheckoutResult result = op.getResult(repository);
if (result.getStatus() != CheckoutResult.Status.OK) {
throw new IllegalStateException("Unable to checkout branch " + refName + " result:" + result); //$NON-NLS-1$ //$NON-NLS-2$
}

Back to the top