/// <summary> /// This method is the base to build full command line to execute Jedi VCS /// </summary> /// <params name="result">Integration parameters</params> /// <params name="args">The specific command to execute with parameters</params> /// <returns>The default command line to execute jvcs.exe with options</returns> private ProcessInfo NewProcessInfoWithArgs(IIntegrationResult result, JediVCSProcessArgumentBuilder args) { if (String.IsNullOrEmpty(Server)) throw new JediVCSException("JediVCS plugin error : No Server Name or ip adress "); if (String.IsNullOrEmpty(UserName)) throw new JediVCSException("JediVCS plugin error : blank user Name or password !"); if (String.IsNullOrEmpty(Password)) throw new JediVCSException("JediVCS plugin error : blank user Name or password !"); JediVCSProcessArgumentBuilder builder = new JediVCSProcessArgumentBuilder(); builder.AddArgument(Server); if (ServerPort != DefaultJediVCSServerPort) { builder.AppendArgument(":"); builder.AppendArgument(ServerPort); } builder.AddArgument("user", UserName); builder.AddArgument("password", Password); builder.AddArguments(args); if (JediVCSPath.Equals(string.Empty)) return new ProcessInfo(Executable, builder.ToString(), result.BaseFromWorkingDirectory(WorkingDirectory)); else return new ProcessInfo(JediVCSPath + "\\" + Executable, builder.ToString(), result.BaseFromWorkingDirectory(WorkingDirectory)); }
/// <summary> /// This method is the provided for build labelling command line arguments /// </summary> /// <params name="result">Integration parameters</params> /// <returns>The command line to execute for labelling</returns> private ProcessInfo NewLabelProcessInfo(IIntegrationResult result) { string QuotedLabel; if (result.Label.Contains(" ")) { QuotedLabel = "\"" + result.Label + "\""; } else { QuotedLabel = result.Label; } JediVCSProcessArgumentBuilder buffer = new JediVCSProcessArgumentBuilder(); buffer.AppendArgument(action_label, GetProjectNameOrId()); buffer.Append(QuotedLabel); return NewProcessInfoWithArgs(result, buffer); }
/// <summary> /// This method is provided for building get module command line /// </summary> /// <params name="result">Integration parameters</params> /// <returns>Process result (standard output)</returns> private ProcessInfo NewGetSourceProcessInfo(IIntegrationResult result, string dir) { JediVCSProcessArgumentBuilder builder = new JediVCSProcessArgumentBuilder(); builder.AppendArgument(action_syncprojectgroup, ProjectName); return NewProcessInfoWithArgs(result, builder); }
/// <summary> /// This method is provided for building get module command line /// </summary> /// <params name="result">Integration parameters</params> /// <returns>Process result (standard output)</returns> private ProcessInfo NewGetModuleProcessInfo(IIntegrationResult result) { JediVCSProcessArgumentBuilder builder = new JediVCSProcessArgumentBuilder(); builder.AppendArgument(action_getmodule, GetProjectNameOrId()); builder.Append("noprompt"); return NewProcessInfoWithArgs(result, builder); }
/// <summary> /// This method is provided for building list of old files command line /// </summary> /// <params name="result">Integration parameters</params> /// <returns>Process result (standard output)</returns> private ProcessInfo NewGetListOldProcessInfo(IIntegrationResult result) { Log.Debug("NewGetListOldProcessInfo"); JediVCSProcessArgumentBuilder builder = new JediVCSProcessArgumentBuilder(); builder.AppendArgument(action_listproject, GetProjectNameOrId()); builder.Append("oldonly"); return NewProcessInfoWithArgs(result, builder); }