Skip to content

Commit

Permalink
[wip] Comparison broken when model resource missing in other branch
Browse files Browse the repository at this point in the history
Change-Id: I734c700aa326c3a7d276c0540056eaf3d5652644
Signed-off-by: Axel Richard <axel.richard@obeo.fr>
  • Loading branch information
AxelRICHARD authored and hudson committed Feb 25, 2017
1 parent 4acdeb0 commit e57843c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2010, 2014 Dariusz Luksza <dariusz@luksza.org> and others.
* Copyright (C) 2010, 2015 Dariusz Luksza <dariusz@luksza.org> and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -10,6 +10,7 @@
* Dariusz Luksza <dariusz@luksza.org> - initial API and implementation
* Laurent Goubet <laurent.goubet@obeo.fr> - Logical Model enhancements
* Gunnar Wagenknecht <gunnar@wagenknecht.org> - Logical Model enhancements
* Axel Richard <axel.richard@obeo.fr> - Logical Model enhancements
*******************************************************************************/
package org.eclipse.egit.ui.internal.synchronize;

Expand Down Expand Up @@ -252,6 +253,12 @@ public ICompareInput asCompareInput(Object object) {
revision, getLocalEncoding(resource));
((ResourceDiffCompareInput) input).setLeft(newSource);
}
if (input.getRight() == null) {
final ITypedElement newEmptyRemote = new GitCompareFileRevisionEditorInput.EmptyTypedElement(
resource.getName());
((ResourceDiffCompareInput) input)
.setRight(newEmptyRemote);
}
} catch (TeamException e) {
// Keep the input from super as-is
String error = NLS
Expand Down

0 comments on commit e57843c

Please sign in to comment.