private String checkinScriptCommand ( ) { String exportModules = "" ; if ( ( m_modulesToExport != null ) && ! m_modulesToExport . isEmpty ( ) ) { StringBuffer exportModulesParam = new StringBuffer ( ) ; for ( String moduleName : m_modulesToExport ) { exportModulesParam . append ( " " ) . append ( moduleName ) ; } exportModulesParam . replace ( 0 , 1 , " \"" ) ; exportModulesParam . append ( "\" " ) ; exportModules = " --modules " + exportModulesParam . toString ( ) ; } String commitMessage = "" ; if ( m_commitMessage != null ) { commitMessage = " -msg \"" + m_commitMessage . replace ( "\"" , "\\\"" ) + "\"" ; } String gitUserName = "" ; if ( m_gitUserName != null ) { if ( m_gitUserName . trim ( ) . isEmpty ( ) ) { gitUserName = " --ignore-default-git-user-name" ; } else { gitUserName = " --git-user-name \"" + m_gitUserName + "\"" ; } } String gitUserEmail = "" ; if ( m_gitUserEmail != null ) { if ( m_gitUserEmail . trim ( ) . isEmpty ( ) ) { gitUserEmail = " --ignore-default-git-user-email" ; } else { gitUserEmail = " --git-user-email \"" + m_gitUserEmail + "\"" ; } } String autoPullBefore = "" ; if ( m_autoPullBefore != null ) { autoPullBefore = m_autoPullBefore . booleanValue ( ) ? " --pull-before " : " --no-pull-before" ; } String autoPullAfter = "" ; if ( m_autoPullAfter != null ) { autoPullAfter = m_autoPullAfter . booleanValue ( ) ? " --pull-after " : " --no-pull-after" ; } String autoPush = "" ; if ( m_autoPush != null ) { autoPush = m_autoPush . booleanValue ( ) ? " --push " : " --no-push" ; } String exportFolder = " --export-folder \"" + m_currentConfiguration . getModuleExportPath ( ) + "\"" ; String exportMode = " --export-mode " + m_currentConfiguration . getExportMode ( ) ; String excludeLibs = "" ; if ( m_excludeLibs != null ) { excludeLibs = m_excludeLibs . booleanValue ( ) ? " --exclude-libs" : " --no-exclude-libs" ; } String commitMode = "" ; if ( m_commitMode != null ) { commitMode = m_commitMode . booleanValue ( ) ? " --commit" : " --no-commit" ; } String ignoreUncleanMode = "" ; if ( m_ignoreUnclean != null ) { ignoreUncleanMode = m_ignoreUnclean . booleanValue ( ) ? " --ignore-unclean" : " --no-ignore-unclean" ; } String copyAndUnzip = "" ; if ( m_copyAndUnzip != null ) { copyAndUnzip = m_copyAndUnzip . booleanValue ( ) ? " --copy-and-unzip" : " --no-copy-and-unzip" ; } String configFilePath = m_currentConfiguration . getFilePath ( ) ; return "\"" + DEFAULT_SCRIPT_FILE + "\"" + exportModules + commitMessage + gitUserName + gitUserEmail + autoPullBefore + autoPullAfter + autoPush + exportFolder + exportMode + excludeLibs + commitMode + ignoreUncleanMode + copyAndUnzip + " \"" + configFilePath + "\"" ; }
Returns the command to run by the shell to normally run the checkin script .