:doc:`CodeCommit <../../codecommit>` / Client / get_merge_options

*****************
get_merge_options
*****************



.. py:method:: CodeCommit.Client.get_merge_options(**kwargs)

  

  Returns information about the merge options available for merging two specified branches. For details about why a merge option is not available, use GetMergeConflicts or DescribeMergeConflicts.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeOptions>`_  


  **Request Syntax**
  ::

    response = client.get_merge_options(
        repositoryName='string',
        sourceCommitSpecifier='string',
        destinationCommitSpecifier='string',
        conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
        conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE'
    )
    
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository that contains the commits about which you want to get merge options.

    

  
  :type sourceCommitSpecifier: string
  :param sourceCommitSpecifier: **[REQUIRED]** 

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

    

  
  :type destinationCommitSpecifier: string
  :param destinationCommitSpecifier: **[REQUIRED]** 

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

    

  
  :type conflictDetailLevel: string
  :param conflictDetailLevel: 

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

    

  
  :type conflictResolutionStrategy: string
  :param conflictResolutionStrategy: 

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'mergeOptions': [
              'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
          ],
          'sourceCommitId': 'string',
          'destinationCommitId': 'string',
          'baseCommitId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **mergeOptions** *(list) --* 

        The merge option or strategy used to merge the code.

        
        

        - *(string) --* 
    
      

      - **sourceCommitId** *(string) --* 

        The commit ID of the source commit specifier that was used in the merge evaluation.

        
      

      - **destinationCommitId** *(string) --* 

        The commit ID of the destination commit specifier that was used in the merge evaluation.

        
      

      - **baseCommitId** *(string) --* 

        The commit ID of the merge base.

        
  
  **Exceptions**
  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidRepositoryNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidCommitException`

  
  *   :py:class:`CodeCommit.Client.exceptions.TipsDivergenceExceededException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidConflictDetailLevelException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidConflictResolutionStrategyException`

  
  *   :py:class:`CodeCommit.Client.exceptions.MaximumFileContentToLoadExceededException`

  
  *   :py:class:`CodeCommit.Client.exceptions.MaximumItemsToCompareExceededException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyDisabledException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyNotFoundException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyUnavailableException`

  