|
@@ -30,6 +30,8 @@ type ChurnAnalysis struct {
|
|
|
|
|
|
// references IdentityDetector.ReversedPeopleDict
|
|
|
reversedPeopleDict []string
|
|
|
+
|
|
|
+ l hercules.Logger
|
|
|
}
|
|
|
|
|
|
type editInfo struct {
|
|
@@ -105,6 +107,9 @@ func (churn *ChurnAnalysis) Description() string {
|
|
|
|
|
|
// Configure applies the parameters specified in the command line. Map keys correspond to "Name".
|
|
|
func (churn *ChurnAnalysis) Configure(facts map[string]interface{}) error {
|
|
|
+ if l, exists := facts[hercules.ConfigLogger].(hercules.Logger); exists {
|
|
|
+ churn.l = l
|
|
|
+ }
|
|
|
if val, exists := facts[ConfigChurnTrackPeople].(bool); exists {
|
|
|
churn.TrackPeople = val
|
|
|
}
|
|
@@ -116,6 +121,7 @@ func (churn *ChurnAnalysis) Configure(facts map[string]interface{}) error {
|
|
|
|
|
|
// Initialize resets the internal temporary data structures and prepares the object for Consume().
|
|
|
func (churn *ChurnAnalysis) Initialize(repository *git.Repository) error {
|
|
|
+ churn.l = hercules.NewLogger()
|
|
|
churn.global = []editInfo{}
|
|
|
churn.people = map[int][]editInfo{}
|
|
|
churn.OneShotMergeProcessor.Initialize()
|