/// <summary> /// Handles the Click event of the createTagBttn control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void createTagBttn_Click(object sender, EventArgs e) { string name = tagName.Text.Trim(); if (tagComment.Text.Trim().Length == 0) { createTagErrorLabel.Text = LoggingManager.GetErrorMessageResource("RepositoryCommentRequired"); } else if (!SourceIntegrationManager.IsValidSubversionName(name)) { createTagErrorLabel.Text = LoggingManager.GetErrorMessageResource("InvalidRepositoryTagName"); } else { svnOut.Text = SourceIntegrationManager.CreateTag(this.ProjectId, name, tagComment.Text, tagUserName.Text.Trim(), tagPassword.Text.Trim()); } }
/// <summary> /// Handles the Click event of the createRepoBttn control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void createRepoBttn_Click(object sender, EventArgs e) { string name = repoName.Text.Trim(); if (!SourceIntegrationManager.IsValidSubversionName(name)) { createErrorLbl.Text = LoggingManager.GetErrorMessageResource("InvalidRepositoryName"); return; } svnOut.Text = SourceIntegrationManager.CreateRepository(name); string rootUrl = HostSettingManager.Get(HostSettingNames.RepositoryRootUrl); if (!rootUrl.EndsWith("/")) { rootUrl += "/"; } svnUrl.Text = rootUrl + name; }