From d2ab7a68e4c3f1e619af3576e1443afa2f98cdfd Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 06 Mar 2014 14:32:08 -0500
Subject: [PATCH] Fixed bug in merge: improper use of force and failing on FORCED result
---
src/main/java/com/gitblit/IStoredSettings.java | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/gitblit/IStoredSettings.java b/src/main/java/com/gitblit/IStoredSettings.java
index 33c36ac..6b58e89 100644
--- a/src/main/java/com/gitblit/IStoredSettings.java
+++ b/src/main/java/com/gitblit/IStoredSettings.java
@@ -333,6 +333,16 @@
}
/**
+ * Override the specified key with the specified value.
+ *
+ * @param key
+ * @param value
+ */
+ public void overrideSetting(String key, boolean value) {
+ overrides.put(key, "" + value);
+ }
+
+ /**
* Updates the values for the specified keys and persists the entire
* configuration file.
*
@@ -341,4 +351,13 @@
* @return true if successful
*/
public abstract boolean saveSettings(Map<String, String> updatedSettings);
+
+ /**
+ * Merge all settings from the settings parameter into this instance.
+ *
+ * @param settings
+ */
+ public void merge(IStoredSettings settings) {
+ getSettings().putAll(settings.getSettings());
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1