Executes a merge, but translates any {GitExecuteError} to a {MergeError}

 @param (see #merge)
 @option (see #merge)
 @raise [MergeError] if there is a problem executing the merge
422263
def proc_merge(base, opts = {})
      begin
        return merge(base, opts)
      rescue GitExecuteError => merge_error
        raise MergeError.new(merge_error.message, self)
      end
    end
1178536
def merge(self, *args):
        
        for data in args:
            if isinstance(data, str):
                to_merge = load_string(data, self.context)
                if not to_merge:
                    continue
            else:
                to_merge = data

            if not self.can_merge(to_merge):
                raise TypeError(
                    'Cannot merge myself:%s with %s. data: %s' \
                    % (type(self), type(data), data)
                )

            self._merge(to_merge)
628886
def merge!(pairs, options={}, &block)
      return super unless method = [:merge!, :update].find do |method|
        @backend.respond_to? method
      end

      hash = Hash === pairs ? pairs : Hash[pairs.to_a]
      case method
      when :merge!
        @backend.merge!(hash, &block)
      when :update
        @backend.update(hash, &block)
      end

      self
    end
868611
def concatenating_merge(options, options2, *args)
      options = call_each_hash_value_with_params(options, *args) || {}
      options2 = call_each_hash_value_with_params(options2, *args) || {}


      options.symbolize_keys.merge(options2.symbolize_keys) do |key, v1, v2|
        if v1.is_a?(String) && v2.is_a?(String)
          "#{v1} #{v2}"
        else
          v2
        end
      end
    end
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
1015358
def execute
      if options[:version]
        self.console.puts "traject version #{Traject::VERSION}"
        return
      end
      if options[:help]
        self.console.puts slop.help
        return
      end


      (options[:load_path] || []).each do |path|
        $LOAD_PATH << path unless $LOAD_PATH.include? path
      end

      arg_check!

      self.indexer = initialize_indexer!

      ######
      # SAFE TO LOG to indexer.logger starting here, after indexer is set up from conf files
      # with logging config.
      #####

      indexer.logger.info("traject (#{Traject::VERSION}) executing with: `#{orig_argv.join(' ')}`")

      # Okay, actual command process! All command_ methods should return true
      # on success, or false on failure.
      result =
        case options[:command]
        when "process"
          (io, filename) = get_input_io(self.remaining_argv)
          indexer.settings['command_line.filename'] = filename if filename
          indexer.process(io)
        when "marcout"
           (io, filename) = get_input_io(self.remaining_argv)
          indexer.settings['command_line.filename'] = filename if filename
          command_marcout!(io)
        when "commit"
          command_commit!
        else
          raise ArgumentError.new("Unrecognized traject command: #{options[:command]}")
        end

      return result
    rescue Exception => e
      # Try to log unexpected exceptions if possible
      indexer && indexer.logger && indexer.logger.fatal("Traject::CommandLine: Unexpected exception, terminating execution: #{Traject::Util.exception_to_log_message(e)}") rescue nil
      raise e
    end
829262
def execute(input, negate)
      method = negate ? :reject : :select

      input.send(method) do |object|
        type_count(object).send(comparison.operator, comparison.amount)
      end
    end
597232
def merge!(schema)
      if schema.is_a?(Schema)
        @data.merge!(schema.data)
      else
        @data.merge!(schema)
      end
    end
401704
def exec!(object, options)
      mark_as_failure! # going to execute! set to failure initially
      @options = options
      if object.method(name.to_sym).arity > 1
        mark_as_success! if object.public_send(name.to_sym, options, **options) != false
      else
        mark_as_success! if object.public_send(name.to_sym, options) != false
      end
      
      @block.(options) if success? && @block

      self.executed = true

      self
    
    rescue => e
      @error = e.message

      self.executed = false
      
      mark_as_failure!
      
      self
    end
765971
def [](argument)
      case argument
      when String
        target = Branch.new(@repo, argument)
        @branches.detect { |b| b == target }
      else
        @branches.__send__(:[], argument)
      end
    end
600364
def do_execute(self):
        
        expr = str(self.resolve_option("expression"))
        expr = expr.replace("{X}", str(self.input.payload))
        self._output.append(Token(eval(expr)))
        return None
621197
def deep_merge(source, options = {})
      default_opts = {:preserve_unmergeables => true}
      DeepMerge::deep_merge!(source, self, default_opts.merge(options))
    end
741834
def deeper_merge(source, options = {})
      default_opts = {:preserve_unmergeables => true}
      DeepMerge::deep_merge!(source, self, default_opts.merge(options))
    end
432242
def execute_helper(block, opts)
      if_condition = execute_helper_condition(opts[:if])
      unless_condition = !execute_helper_condition(opts[:unless], false)

      block.call if if_condition && unless_condition
    end
1063933
def rake_merge_option(args, defaults)
      if Hash === args.last
        defaults.update(args.last)
        args.pop
      end
      args.push defaults
      args
    end
520725
def do_execute(self):
        
        relname = self.resolve_option("name")
        if isinstance(self.input.payload, Instance):
            self.input.payload.dataset.relationname = relname
        else:
            self.input.payload.relationname = relname
        self._output.append(self.input)
        return None
335774
def exec(method, options = {}, &code)
    Manager.connection.exec(method, options, &code)
  end