Check if one or more merge commit is detected.

 @param  [Symbol] level (Default: :fail)
         The report level (:fail, :warn, :message) if the check fails [report](#report)
 @return [void]
771339
def check_merge_commit_detected(level = :fail)
      message = 'Some merge commits were detected, you must use rebase to sync with base branch.'
      merge_commit_detector = /^Merge branch '#{github.branch_for_base}'/

      report(level, message) if git.commits.any? { |commit| commit.message =~ merge_commit_detector }
    end
1139430
def log(text, level = :notice)
      level = allowable_log_level(level)

      if level == :debug && @log_level == :debug
        @task_run.add_log_text(text)
      elsif level == :notice && (@log_level == :debug || @log_level == :notice)
        @task_run.add_log_text(text)
      elsif level == :error
        @task_run.add_error_text(text)
      end
    end
1196987
private boolean checkMisroutedIv2IntiateTaskMessage(Iv2InitiateTaskMessage message) {
        if (message.isForReplica()) {
            return false;
        }

        if (m_scheduler.isLeader() && m_migratePartitionLeaderStatus != MigratePartitionLeaderStatus.TXN_RESTART) {
            //At this point, the message is sent to partition leader
            return false;
        }

        //At this point, the message is misrouted.
        //(1) If a site has been demoted via @MigratePartitionLeader, the messages which are sent to the leader will be restarted.
        //(2) If a site becomes new leader via @MigratePartitionLeader. Transactions will be restarted before it gets notification from old
        //    leader that transactions on older leader have been drained.
        InitiateResponseMessage response = new InitiateResponseMessage(message);
        response.setMisrouted(message.getStoredProcedureInvocation());
        response.m_sourceHSId = getHSId();
        deliver(response);
        if (tmLog.isDebugEnabled()) {
            tmLog.debug("Sending message back on:" + CoreUtils.hsIdToString(m_hsId) + " isLeader:" + m_scheduler.isLeader() +
                    " status:" + m_migratePartitionLeaderStatus + "\n" + message);
        }
        //notify the new partition leader that the old leader has completed the Txns if needed.
        notifyNewLeaderOfTxnDoneIfNeeded();
        return true;
    }
1260000
def status(commit, ignore: [])
      tree = get_object(commit.tree) unless commit.nil?

      Utils::Status.compare_tree_and_store tree,
                                           staging_area,
                                           object_store,
                                           ignore: ignore
    end
692072
def _validate_index_level(self, level):
        
        if isinstance(level, int):
            if level < 0 and level != -1:
                raise IndexError("Too many levels: Index has only 1 level,"
                                 " %d is not a valid level number" % (level, ))
            elif level > 0:
                raise IndexError("Too many levels:"
                                 " Index has only 1 level, not %d" %
                                 (level + 1))
        elif level != self.name:
            raise KeyError('Level %s must be same as name (%s)' %
                           (level, self.name))
314297
protected boolean hasFailuresLevel(Collection<Failure> failures, int severity)
   {
      if (failures != null)
      {
         for (Failure failure : failures)
         {
            if (failure.getSeverity() == severity)
            {
               return true;
            }
         }
      }
      return false;
   }
780695
def perform
      git.if_clean do
        check_out_branch
        merge_pull_request
        comment_about_merge
      end
    rescue => e
      case e
      when GitHub::PullRequest::NotFound
        cli.say "Unable to find pull request #{pull_request_id}. Please retry with a valid ID."
      when Git::MergeFailed
        cli.say "Merge failed. Please identify the source of this merge conflict resolve this conflict in your pull request's branch. NOTE: Merge conflicts resolved in the #{branch_type} branch are NOT used when deploying."
      when Git::CheckoutFailed
        cli.say "Checkout of #{branch_to_merge_into} failed. Please contact Infrastructure to determine the cause."
      when GitHub::PullRequest::CommentFailed
        cli.say "Unable to write comment. Please navigate to #{pull_request.url} and add the comment, '#{comment_body}'"
      else
        cli.say "An unknown error occurred: #{e.inspect}"
      end
      raise
    end
134355
private void checkVersionOnJoinedInheritance(List<String> errors, Config config) {
        for (Entity entity : config.getProject().getRootEntities().getList()) {
            if (entity.hasInheritance() && entity.getInheritance().is(JOINED)) {
                for (Entity child : entity.getAllChildrenRecursive()) {
                    for (Attribute attribute : child.getAttributes().getList()) {
                        if (attribute.isVersion()) {
                            errors.add(attribute.getFullColumnName() + " is a version column, you should not have @Version in a child joined entity."
                                    + " Use ignore=true in columnConfig or remove it from your table.");
                        }
                    }
                }
            }
        }
    }
54967
def check_for_missing_enabled_option(hash)
      return unless @log

      any_warnings = false

      Overcommit::Utils.supported_hook_type_classes.each do |hook_type|
        hash.fetch(hook_type) { {} }.each do |hook_name, hook_config|
          next if hook_name == 'ALL'

          if hook_config['enabled'].nil?
            @log.warning "#{hook_type}::#{hook_name} hook does not explicitly " \
                         'set `enabled` option in .overcommit.yml'
            any_warnings = true
          end
        end
      end

      @log.newline if any_warnings
    end
626225
def dev_log_level
      if value = tag_value(LOG_LEVEL_TAG)
        value = value.downcase.to_sym
        value = nil unless [:debug, :info, :warn, :error, :fatal].include?(value)
      end
      value
    end
884458
def _has_level_handler(logger):
    
    level = logger.getEffectiveLevel()
    current = logger

    while current:
        if any(handler.level <= level for handler in current.handlers):
            return True

        if not current.propagate:
            break

        current = current.parent

    return False
790779
private static boolean isTruePartitionOfTopLevelStep(Step step) {
		Partition partition = step.getPartition();
		
		if (partition.getMapper() != null ) {
			if (logger.isLoggable(Level.FINER)) {
				logger.logp(Level.FINER, CLASSNAME, "validatePartition", "Found partitioned step with mapper" , step);
			}
			return true;
		} else if (partition.getPlan() != null) {
			if (partition.getPlan().getPartitions() != null) {
				if (logger.isLoggable(Level.FINER)) {
					logger.logp(Level.FINER, CLASSNAME, "validatePartition", "Found partitioned step with plan", step);
				}
			return true;
			} else {
				if (logger.isLoggable(Level.FINER)) {
					logger.logp(Level.FINER, CLASSNAME, "validatePartition", "Found plan with partitions stripped out.  Must be a partition on the partition work unit thread", step);
				}
				return false;
			}
		} else {
			throw new IllegalArgumentException("Partition does not contain either a mapper or a plan.  Aborting.");
		}
		
	}
562189
def logger_level=(level)
      logger.level = LOGGER_LEVEL[level] if LOGGER_LEVEL.key?(level)
      logger
    end
1151475
def notify(step, options = {})
      notifiers.each do |notifier|
        notifier.notify(step, default_payload.merge(options))
      end
    end
220753
private void checkFinishedPartitions() {

        List<String> failingPartitionSeen = new ArrayList<String>();
        boolean stoppedPartitionSeen = false;

        for (PartitionReplyMsg replyMsg : finishedWork) {
            BatchStatus batchStatus = replyMsg.getBatchStatus();

            if (logger.isLoggable(Level.FINE)) {
                logger.fine("For partitioned step: " + getStepName() + ", the partition # " +
                            replyMsg.getPartitionPlanConfig().getPartitionNumber() + " ended with status '" + batchStatus);
            }

            // Keep looping, just to see the log messages perhaps.
            if (batchStatus.equals(BatchStatus.FAILED)) {

                String msg = "For partitioned step: " + getStepName() + ", the partition # " +
                             replyMsg.getPartitionPlanConfig().getPartitionNumber() + " ended with status '" + batchStatus;
                failingPartitionSeen.add(msg);
            }
            // This code seems to suggest it might be valid for a partition to end up in STOPPED state without
            // the "top-level" step having been aware of this.   It's unclear from the spec if this is even possible
            // or a desirable spec interpretation.  Nevertheless, we'll code it as such noting the ambiguity.
            //
            // However, in the RI at least, we won't bother updating the step level BatchStatus, since to date we
            // would only transition the status in such a way independently.
            if (batchStatus.equals(BatchStatus.STOPPED)) {
                stoppedPartitionSeen = true;
            }
        }

        if (!failingPartitionSeen.isEmpty()) {
            markStepForFailure();
            rollbackPartitionedStep();
            throw new BatchContainerRuntimeException("One or more partitions failed: " + failingPartitionSeen);
        } else if (isStoppingStoppedOrFailed()) {
            rollbackPartitionedStep();
        } else if (stoppedPartitionSeen) {

            // At this point, the top-level job is still running.
            // If we see a stopped partition, we mark the step/job failed
            markStepForFailure();
            rollbackPartitionedStep();
        } else {
            // Call before completion
            if (this.partitionReducerProxy != null) {
                this.partitionReducerProxy.beforePartitionedStepCompletion();
            }
        }

    }
893951
private function _writeError($check, $message, $lineNumber = null, $level = null) {
		if ($lineNumber === null) {
			$lineNumber = $this->lineNumber;
		}

		// If level not specified, get it in the config
		if ($level === null) {
			$level = $this->_config->getTestLevel($check);
			// If level not found in the config then WARNING by default.
			if ($level === null) {
				$level = WARNING;
			}
		}

		$this->errorCounts[$level] ++;

		$this->_reporter->writeError($lineNumber, $check, $message, $level);
	}
893121
def growl_level_num( level )
      level = Integer(level)
      if level < -2 or level > 2
        raise ArgumentError, "level '#{level}' is not in range -2..2"
      end
      level
    end