Class GitScmProviderRepository


public class GitScmProviderRepository extends ScmProviderRepositoryWithHost
Author:
Emmanuel Venisse, Mark Struberg
  • Field Details

    • URL_DELIMITER_FETCH

      public static final String URL_DELIMITER_FETCH
      Sequence used to delimit the fetch URL.
      See Also:
    • URL_DELIMITER_PUSH

      public static final String URL_DELIMITER_PUSH
      Sequence used to delimit the push URL.
      See Also:
    • PROTOCOL_SEPARATOR

      public static final String PROTOCOL_SEPARATOR
      This trails every protocol.
      See Also:
    • PROTOCOL_FILE

      public static final String PROTOCOL_FILE
      Use local file as transport.
      See Also:
    • PROTOCOL_GIT

      public static final String PROTOCOL_GIT
      Use gits internal protocol.
      See Also:
    • PROTOCOL_SSH

      public static final String PROTOCOL_SSH
      Use secure shell protocol.
      See Also:
    • PROTOCOL_HTTP

      public static final String PROTOCOL_HTTP
      Use the standard port 80 http protocol.
      See Also:
    • PROTOCOL_HTTPS

      public static final String PROTOCOL_HTTPS
      Use the standard port 443 https protocol.
      See Also:
    • PROTOCOL_RSYNC

      public static final String PROTOCOL_RSYNC
      Use rsync for retrieving the data TODO implement!
      See Also:
    • PROTOCOL_NONE

      public static final String PROTOCOL_NONE
      No special protocol specified. Git will either use git:// or ssh:// depending on whether we work locally or over the network.
      See Also:
  • Constructor Details

  • Method Details

    • getProvider

      public String getProvider()
      Returns:
      either 'git' or 'jgit' depending on the underlying implementation being used
    • getFetchInfo

      public RepositoryUrl getFetchInfo()
    • getPushInfo

      public RepositoryUrl getPushInfo()
    • getFetchUrl

      public String getFetchUrl()
      Returns:
      the URL used to fetch from the upstream repository
    • getFetchUrlWithMaskedPassword

      public String getFetchUrlWithMaskedPassword()
      Returns:
      the URL to fetch from with masked password used for logging purposes only
    • getPushUrl

      public String getPushUrl()
      Returns:
      the URL used to push to the upstream repository
    • getPushUrlWithMaskedPassword

      public String getPushUrlWithMaskedPassword()
      Returns:
      the URL to push to with masked password used for logging purposes only
    • getRelativePath

      public String getRelativePath(ScmProviderRepository ancestor)
      Get the relative path between the repository provided as argument and the current repository.
      Overrides:
      getRelativePath in class ScmProviderRepository
      Parameters:
      ancestor - another repository that should be ancestor of this one
      Returns:
      the relative path or null if it can't be resolved
    • toString

      public String toString()
      Overrides:
      toString in class Object