From 856091d000befd51967f20e1a7e59ccc59663f99 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Tue, 20 Mar 2012 19:39:20 -0400
Subject: [PATCH] Properly handle renames on incremental indexing
---
src/com/gitblit/client/EditRepositoryDialog.java | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/com/gitblit/client/EditRepositoryDialog.java b/src/com/gitblit/client/EditRepositoryDialog.java
index 4d3485d..5c746cc 100644
--- a/src/com/gitblit/client/EditRepositoryDialog.java
+++ b/src/com/gitblit/client/EditRepositoryDialog.java
@@ -105,6 +105,8 @@
private JPalette<String> setsPalette;
private JPalette<String> teamsPalette;
+
+ private JPalette<String> indexedBranchesPalette;
private JPalette<String> preReceivePalette;
@@ -258,6 +260,12 @@
.add(newFieldPanel(Translation.get("gb.federationSets"),
setsPalette), BorderLayout.CENTER);
+ indexedBranchesPalette = new JPalette<String>();
+ JPanel indexedBranchesPanel = new JPanel(new BorderLayout(5, 5));
+ indexedBranchesPanel
+ .add(newFieldPanel(Translation.get("gb.indexedBranches"),
+ indexedBranchesPalette), BorderLayout.CENTER);
+
preReceivePalette = new JPalette<String>(true);
preReceiveInherited = new JLabel();
JPanel preReceivePanel = new JPanel(new BorderLayout(5, 5));
@@ -277,6 +285,9 @@
panel.addTab(Translation.get("gb.teams"), teamsPanel);
}
panel.addTab(Translation.get("gb.federation"), federationPanel);
+ if (protocolVersion >= 3) {
+ panel.addTab(Translation.get("gb.indexedBranches"), indexedBranchesPanel);
+ }
panel.addTab(Translation.get("gb.preReceiveScripts"), preReceivePanel);
panel.addTab(Translation.get("gb.postReceiveScripts"), postReceivePanel);
@@ -433,7 +444,8 @@
if (repository.federationStrategy.exceeds(FederationStrategy.EXCLUDE)) {
repository.federationSets = setsPalette.getSelections();
}
-
+
+ repository.indexedBranches = indexedBranchesPalette.getSelections();
repository.preReceiveScripts = preReceivePalette.getSelections();
repository.postReceiveScripts = postReceivePalette.getSelections();
return true;
@@ -470,6 +482,10 @@
public void setFederationSets(List<String> all, List<String> selected) {
setsPalette.setObjects(all, selected);
}
+
+ public void setIndexedBranches(List<String> all, List<String> selected) {
+ indexedBranchesPalette.setObjects(all, selected);
+ }
public void setPreReceiveScripts(List<String> all, List<String> inherited,
List<String> selected) {
--
Gitblit v1.9.1