Interface RebaseAndCommit.IRebase

  • Enclosing class:
    RebaseAndCommit

    public static interface RebaseAndCommit.IRebase
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getCommentForCommit()
      Construct commit message.
      java.lang.String getFileCharset​(java.io.File file)
      Get charset of file for convert EOL to repository.
      void parseBaseFile​(java.io.File file)
      Rebaser should read and parse BASE version of file.
      void parseHeadFile​(java.io.File file)
      Rebaser should read and parse HEAD version of file.
      void rebaseAndSave​(java.io.File out)
      Rebase using BASE, HEAD and non-committed version should be processed.
    • Method Detail

      • parseBaseFile

        void parseBaseFile​(java.io.File file)
                    throws java.lang.Exception
        Rebaser should read and parse BASE version of file. It can't just remember file path because file will be removed after switch into other version. Rebase can be called after that or can not be called.

        Case for non-exist file: it's correct call. That means file is just created in local box. But after that, remote repository can also contain file, i.e. two users created file independently, then rebase will be called. Implementation should interpret non-exist file as empty data.

        Throws:
        java.lang.Exception
      • parseHeadFile

        void parseHeadFile​(java.io.File file)
                    throws java.lang.Exception
        Rebaser should read and parse HEAD version of file. It can't just remember file path because file will be removed after switch into other version. Rebase can be called after that or can not be called.

        Case for non-exist file: it's correct call. That means file was removed from repository. Implementation should interpret non-exist file as empty data.

        Throws:
        java.lang.Exception
      • rebaseAndSave

        void rebaseAndSave​(java.io.File out)
                    throws java.lang.Exception
        Rebase using BASE, HEAD and non-committed version should be processed. At this time parseBaseFile and parseHeadFile was already called. Keep in mind that this method can display some dialogs to user, i.e. can work up to some minutes.
        Throws:
        java.lang.Exception
      • getCommentForCommit

        java.lang.String getCommentForCommit()
        Construct commit message.
      • getFileCharset

        java.lang.String getFileCharset​(java.io.File file)
                                 throws java.lang.Exception
        Get charset of file for convert EOL to repository. Implementation can return null if conversion not required.
        Throws:
        java.lang.Exception