Class HgScmTranslator

    • Constructor Summary

      Constructors 
      Constructor Description
      HgScmTranslator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String resolveTag​(java.lang.String tag)
      Determine what tag should be added to the POM given the original tag and the new one.
      java.lang.String toRelativePath​(java.lang.String path)
      Translates an ScmFile path to a path relative to the working directory.
      java.lang.String translateBranchUrl​(java.lang.String url, java.lang.String branchName, java.lang.String branchBase)
      Take an URL and find the correct replacement URL for a given branch.
      java.lang.String translateTagUrl​(java.lang.String url, java.lang.String tag, java.lang.String tagBase)
      Take an URL and find the correct replacement URL for a given tag.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HgScmTranslator

        public HgScmTranslator()
    • Method Detail

      • translateBranchUrl

        public java.lang.String translateBranchUrl​(java.lang.String url,
                                                   java.lang.String branchName,
                                                   java.lang.String branchBase)
        Description copied from interface: ScmTranslator
        Take an URL and find the correct replacement URL for a given branch.
        Specified by:
        translateBranchUrl in interface ScmTranslator
        Parameters:
        url - the source URL
        branchName - the branch name
        branchBase - the branch base for providers that support it
        Returns:
        the replacement URL
      • translateTagUrl

        public java.lang.String translateTagUrl​(java.lang.String url,
                                                java.lang.String tag,
                                                java.lang.String tagBase)
        Description copied from interface: ScmTranslator
        Take an URL and find the correct replacement URL for a given tag.
        Specified by:
        translateTagUrl in interface ScmTranslator
        Parameters:
        url - the source URL
        tag - the tag
        tagBase - the tag base for providers that support it
        Returns:
        the replacement URL
      • resolveTag

        public java.lang.String resolveTag​(java.lang.String tag)
        Description copied from interface: ScmTranslator
        Determine what tag should be added to the POM given the original tag and the new one.
        Specified by:
        resolveTag in interface ScmTranslator
        Parameters:
        tag - the new tag
        Returns:
        the tag to use, or null if the provider does not use tags
      • toRelativePath

        public java.lang.String toRelativePath​(java.lang.String path)
        Description copied from interface: ScmTranslator
        Translates an ScmFile path to a path relative to the working directory.
        Specified by:
        toRelativePath in interface ScmTranslator
        Returns:
        the relative path with OS specific File separator