Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2013-05-06 19:56:23 +0000
committerMatthias Sohn2013-05-07 23:49:13 +0000
commit94188f68395fa4bdd7055e90d85377dc832e4c5e (patch)
tree92bcfff3f0ce8e97974d0e5d2ebe6000257ada21 /org.eclipse.egit.ui
parent9a565e888b435570494c65879655dd572e55e035 (diff)
downloadegit-94188f68395fa4bdd7055e90d85377dc832e4c5e.tar.gz
egit-94188f68395fa4bdd7055e90d85377dc832e4c5e.tar.xz
egit-94188f68395fa4bdd7055e90d85377dc832e4c5e.zip
Update EGit for FollowFilter API change
JGit-Change-Id: Idb273d5a92849b42935ac14eed73b796b80aad50 Change-Id: I643508cb18d9b76f5746f2f75e47da60e55f750b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitSelectionDialog.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java9
3 files changed, 13 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java
index a213b249ba..bcdccc553b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java
@@ -46,6 +46,7 @@ import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jgit.diff.DiffConfig;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.diff.RenameDetector;
@@ -719,7 +720,9 @@ abstract class RepositoryActionHandler extends AbstractHandler {
RevWalk rw = new RevWalk(repository);
try {
if (path.length() > 0) {
- FollowFilter filter = FollowFilter.create(path);
+ DiffConfig diffConfig = repository.getConfig().get(
+ DiffConfig.KEY);
+ FollowFilter filter = FollowFilter.create(path, diffConfig);
rw.setTreeFilter(filter);
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitSelectionDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitSelectionDialog.java
index e3cb751f58..5de21d21b1 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitSelectionDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitSelectionDialog.java
@@ -33,6 +33,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jgit.diff.DiffConfig;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.lib.Constants;
@@ -255,10 +256,11 @@ public class CommitSelectionDialog extends TitleAreaDialog {
for (IResource resource : filterResources) {
RepositoryMapping mapping = RepositoryMapping.getMapping(resource);
if (mapping != null) {
+ DiffConfig diffConfig = mapping.getRepository().getConfig().get(DiffConfig.KEY);
String path = mapping.getRepoRelativePath(resource);
if (path != null && !"".equals(path)) { //$NON-NLS-1$
if (resource.getType() == IResource.FILE)
- filters.add(FollowFilter.create(path));
+ filters.add(FollowFilter.create(path, diffConfig));
else
filters.add(AndTreeFilter.create(
PathFilter.create(path), TreeFilter.ANY_DIFF));
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index 3ba67886eb..e2a454cddf 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -66,6 +66,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jgit.diff.DiffConfig;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
@@ -1801,9 +1802,11 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener,
if (paths == null || paths.isEmpty())
throw new IllegalArgumentException("paths must not be null nor empty"); //$NON-NLS-1$
+ DiffConfig diffConfig = currentRepo.getConfig().get(DiffConfig.KEY);
+
List<TreeFilter> followFilters = new ArrayList<TreeFilter>(paths.size());
for (String path : paths)
- followFilters.add(createFollowFilter(path));
+ followFilters.add(createFollowFilter(path, diffConfig));
if (followFilters.size() == 1)
return followFilters.get(0);
@@ -1811,8 +1814,8 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener,
return OrTreeFilter.create(followFilters);
}
- private FollowFilter createFollowFilter(String path) {
- FollowFilter followFilter = FollowFilter.create(path);
+ private FollowFilter createFollowFilter(String path, DiffConfig diffConfig) {
+ FollowFilter followFilter = FollowFilter.create(path, diffConfig);
followFilter.setRenameCallback(new RenameCallback() {
@Override
public void renamed(DiffEntry entry) {

Back to the top