private void buttonZip_Click(object sender, EventArgs e) { SvnChangeSetMaker helper = new SvnChangeSetMaker(); string localPath = string.Empty; List <string> files = helper.getModifiedFiles(localPath); helper.createChangeList(files, localPath, @"C:\temp\cs"); SvnChangeSetHelper.zipChangeSetDir(@"C:\temp\cs", @"C:\temp\cs\ChangeSet.zip"); }
private void buttonSaveChangeList_Click(object sender, RoutedEventArgs e) { string dirPathToSave = this.selectedRepoPath; string tempDirPath = dirPathToSave; if (false == checkboxSaveUnderArchivePath.IsChecked) { System.Windows.Forms.FolderBrowserDialog folderBrowser = new System.Windows.Forms.FolderBrowserDialog(); if (folderBrowser.ShowDialog() == System.Windows.Forms.DialogResult.OK) { dirPathToSave = folderBrowser.SelectedPath; } else { return; } } if (!string.IsNullOrEmpty(dirPathToSave)) { // Choose only selected items List <string> filetoSave = (from change in this.modifiedFileInfo where change.Selected select change.Path).ToList(); if (filetoSave.Count > 0) { List <string> filesToDelete = new List <string>(); if (checkboxSaveUnderArchivePath.IsChecked == true) { tempDirPath = dirPathToSave + "\\svncm_temp"; } LibSvnChangeSet.SvnChangeSetMaker changeset = new LibSvnChangeSet.SvnChangeSetMaker(); changeset.createChangeList(filetoSave, selectedRepoPath, tempDirPath); if (checkboxSaveInZip.IsChecked == true) { filesToDelete.Add(tempDirPath); filesToDelete.Add(tempDirPath + "\\old"); filesToDelete.Add(tempDirPath + "\\new"); filesToDelete.Add(tempDirPath + "\\changeset.txt"); if (SvnChangeSetHelper.zipChangeSetDir(tempDirPath, dirPathToSave + "\\" + textboxZipFileName.Text)) { MessageBox.Show("Saved changes set to " + dirPathToSave); } else { MessageBox.Show("Failed to create zip file at - " + dirPathToSave); } foreach (var path in filesToDelete) { SvnChangeSetHelper.deletePath(path); } } else { MessageBox.Show("Saved changes set to " + tempDirPath); } } } }