Module: check_mk
Branch: master
Commit: ce90083d9f216c0bbba12795382ac7fee4fe0a54
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ce90083d9f216c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 13:22:17 2016 +0100
#3215 FIX WATO git ignore files are now updated on each commit
---
.werks/3215 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 6 +++---
web/htdocs/watolib.py | 1 +
4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/3215 b/.werks/3215
new file mode 100644
index 0000000..2f84780
--- /dev/null
+++ b/.werks/3215
@@ -0,0 +1,9 @@
+Title: WATO git ignore files are now updated on each commit
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.9i1
+Date: 1455625320
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 3f132b5..dbd56fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,7 @@
* 3060 FIX: Folder properties: Fixed exception when a user has no alias set...
* 3062 FIX: Git integration: Fixed not adding files in WATO folders to git control
* 3203 FIX: Distributed WATO: Fixed exception in remote host service discovery...
+ * 3215 FIX: WATO git ignore files are now updated on each commit
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 9f6c673..8c05a28 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -104,6 +104,9 @@ wato_styles = [ "pages", "wato",
"status" ]
def init_wato_datastructures():
+ if config.wato_use_git:
+ prepare_git_commit()
+
create_sample_config() # if called for the very first time!
declare_host_tag_attributes() # create attributes out of tag definitions
declare_site_attribute() # create attribute for distributed WATO
@@ -148,9 +151,6 @@ def page_handler():
if html.is_transaction():
lock_exclusive()
- if config.wato_use_git:
- prepare_git_commit()
-
try:
init_wato_datastructures()
except:
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index d457d80..85aa7b5 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4254,6 +4254,7 @@ def do_git_commit():
# Only commit, if something is changed
if os.popen("cd '%s' && git status --porcelain" %
defaults.default_config_dir).read().strip():
+ write_gitignore_files()
git_command(["add", "*.d/wato"])
message = ", ".join(g_git_messages)
if not message: