Skip to content

Commit 406c288

Browse files
committed
Updates to:
`splunkversioncontrol_backup_class.py` To correct an issue with recording the `git_location` of file changes in more cases
1 parent b771c7d commit 406c288

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ To do this you will need to install Version Control For SplunkCloud on your Splu
289289
[SplunkVersionControlCloud github](https://github.com/gjanders/SplunkVersionControlCloud)
290290

291291
## Release Notes
292+
### 1.2.6
293+
Updates to:
294+
`splunkversioncontrol_backup_class.py`
295+
296+
To correct an issue with recording the `git_location` of file changes in more cases
297+
292298
### 1.2.5
293299
Updates to:
294300
`splunkversioncontrol_backup_class.py`

bin/splunkversioncontrol_backup_class.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,14 +667,16 @@ def process_ko_query_contents(self, results, tag):
667667
if self.file_per_ko:
668668
if not 'ko_name' in a_result:
669669
logger.info("i=\"%s\" ko_name is null, cannot identify an exact changed object \"%s\" tag=%s" % (self.stanzaName, a_result, tag))
670+
overall_matches_list = []
670671
if 'user' in a_result:
671672
#TODO may not work on Windows
672673
find_str = "/" + a_result['user'] + "/"
673674
overall_matches_list = [ entry[0:entry.find(find_str)+len(find_str)] for entry in overall_matches if entry.find(find_str) != -1 ]
674675
else:
675676
find_str = a_result['ko_type']
676677
overall_matches_list = [ entry[0:entry.find(find_str)+len(find_str)] for entry in overall_matches if entry.find(find_str) != -1 ]
677-
overall_matches = list(set(overall_matches_list))
678+
if len(overall_matches_list) > 0:
679+
overall_matches = overall_matches + list(set(overall_matches_list))
678680
else:
679681
file_name = self.create_file_name(a_result['ko_name'])
680682
logger.debug("i=\"%s\" looking for file_name=%s tag=%s" % (self.stanzaName, file_name, tag))

default/app.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ label = SplunkVersionControl
1212
[launcher]
1313
author = Gareth Anderson
1414
description = Version Control software for Splunk instances (backup/restore from git)
15-
version = 1.2.5
15+
version = 1.2.6
1616

1717
[package]
1818
id = SplunkVersionControl

0 commit comments

Comments
 (0)