1
Vote

EvaluateOnType.Add Not Work

description

PendingChange for Added files has
pendingChange.IsAdd = true
pendingChange.IsEdit = true

Then IsChangeIgnored incorrect.
 /// <summary>
        /// Indicates whether a pending change is ignored.
        /// </summary>
        /// <param name="pendingChange">The pending change to test.</param>
        /// <returns><b>true</b> if the change is ignored, otherwise <b>false</b>.</returns>
        private bool IsChangeIgnored(PendingChange pendingChange)
        {
            var isAddSet = Utilities.IsFlagSet(this.Context.Settings.EvaluateOn, EvaluateOnType.Add);
            var isBranchSet = Utilities.IsFlagSet(this.Context.Settings.EvaluateOn, EvaluateOnType.Branch);
            var isEditSet = Utilities.IsFlagSet(this.Context.Settings.EvaluateOn, EvaluateOnType.Edit);
            var isMargeSet = Utilities.IsFlagSet(this.Context.Settings.EvaluateOn, EvaluateOnType.Merge);
            var isRenameSet = Utilities.IsFlagSet(this.Context.Settings.EvaluateOn, EvaluateOnType.Rename);
            
            if (pendingChange.IsAdd && isAddSet)
            {
                return false;
            }


            return pendingChange.IsBranch && !isBranchSet ||
                pendingChange.IsEdit && !isEditSet ||
                pendingChange.IsMerge && !isMargeSet ||
                pendingChange.IsRename && !isRenameSet;
        }

comments

LockTar wrote Sep 8, 2015 at 6:12 AM

Hi,

I don't really understand this issue. Could you elaborate your issue?

Thanks