public VcsExporter(WorkQueue workQueue, Logger logger, RevisionAnalyzer revisionAnalyzer, ChangesetBuilder changesetBuilder, IVcsWrapper vcsWrapper, IDictionary<string, string> usersmap) : base(workQueue, logger) { this.database = revisionAnalyzer.Database; this.revisionAnalyzer = revisionAnalyzer; this.changesetBuilder = changesetBuilder; this.vcsWrapper = vcsWrapper; this.emailDictionary = new Dictionary<string, string>(); this.usernameDictionary = new Dictionary<string, string>(); Regex emailRegex = new Regex("(\\S.*?)\\s*<(.+)>"); foreach (var e in usersmap) { string key = e.Key.ToLower(); string email = e.Value.Trim(); if (email == "") continue; Match m = emailRegex.Match(email); if (m.Success) { this.usernameDictionary.Add(key, m.Groups[1].Value); email = m.Groups[2].Value; } this.emailDictionary.Add(key, email); } }
private void ProcessProject(ProjectInfo projectInfo, Logger logger) { this.repoInfo = new RepoInfo(logger, projectInfo.VssKey, projectInfo.Project); this.repoInfo.RevisionAnalyzer = new RevisionAnalyzer(this.workQueue, logger, this.db); if (!string.IsNullOrEmpty(this.form.excludeTextBox.Text)) { this.repoInfo.RevisionAnalyzer.ExcludeFiles = this.form.excludeTextBox.Text; } this.repoInfo.RevisionAnalyzer.AddItem(projectInfo.Project); this.repoInfo.ChangesetBuilder = new ChangesetBuilder(this.workQueue, logger, this.repoInfo.RevisionAnalyzer); this.repoInfo.ChangesetBuilder.AnyCommentThreshold = TimeSpan.FromSeconds((double)this.form.anyCommentUpDown.Value); this.repoInfo.ChangesetBuilder.SameCommentThreshold = TimeSpan.FromSeconds((double)this.form.sameCommentUpDown.Value); this.repoInfo.ChangesetBuilder.BuildChangesets(); GitExporter gitExporter = new GitExporter(this.workQueue, logger, this.repoInfo.RevisionAnalyzer, this.repoInfo.ChangesetBuilder); if (!string.IsNullOrEmpty(this.form.domainTextBox.Text)) { gitExporter.EmailDomain = this.form.domainTextBox.Text; } if (!string.IsNullOrEmpty(this.form.commentTextBox.Text)) { gitExporter.DefaultComment = this.form.commentTextBox.Text; } if (!this.form.transcodeCheckBox.Checked) { gitExporter.CommitEncoding = this.selectedEncoding; } gitExporter.IgnoreErrors = this.form.ignoreErrorsCheckBox.Checked; gitExporter.ExportToGit(processDir); }
public VcsExporter(WorkQueue workQueue, Logger logger, RevisionAnalyzer revisionAnalyzer, ChangesetBuilder changesetBuilder, IVcsWrapper vcsWrapper, IDictionary <string, string> usersmap) : base(workQueue, logger) { this.database = revisionAnalyzer.Database; this.revisionAnalyzer = revisionAnalyzer; this.changesetBuilder = changesetBuilder; this.vcsWrapper = vcsWrapper; this.emailDictionary = new Dictionary <string, string>(); this.usernameDictionary = new Dictionary <string, string>(); Regex emailRegex = new Regex("(\\S.*?)\\s*<(.+)>"); foreach (var e in usersmap) { string key = e.Key.ToLower(); string email = e.Value.Trim(); if (email == "") { continue; } Match m = emailRegex.Match(email); if (m.Success) { this.usernameDictionary.Add(key, m.Groups[1].Value); email = m.Groups[2].Value; } this.emailDictionary.Add(key, email); } }
public GitExporter(WorkQueue workQueue, Logger logger, RevisionAnalyzer revisionAnalyzer, ChangesetBuilder changesetBuilder) : base(workQueue, logger) { this.database = revisionAnalyzer.Database; this.revisionAnalyzer = revisionAnalyzer; this.changesetBuilder = changesetBuilder; }
public VcsExporter(WorkQueue workQueue, Logger logger, RevisionAnalyzer revisionAnalyzer, ChangesetBuilder changesetBuilder, IVcsWrapper vcsWrapper, IDictionary<string, string> emailDictionary) : base(workQueue, logger) { this.database = revisionAnalyzer.Database; this.revisionAnalyzer = revisionAnalyzer; this.changesetBuilder = changesetBuilder; this.vcsWrapper = vcsWrapper; this.emailDictionary = emailDictionary; }
public GitExporter(WorkQueue workQueue, Logger logger, RevisionAnalyzer revisionAnalyzer, ChangesetBuilder changesetBuilder, string repoPath, FileAnalyzer fileAnalyzer, bool inheritProjectDir = false) : base(workQueue, logger) { this.database = revisionAnalyzer.Database; this.revisionAnalyzer = revisionAnalyzer; this.changesetBuilder = changesetBuilder; this.repoPath = repoPath; this.fileAnalyzer = fileAnalyzer; this.inheritProjectDir = inheritProjectDir; }
public GitExporter( WorkQueue workQueue, Logger logger, RevisionAnalyzer revisionAnalyzer, ChangesetBuilder changesetBuilder, IMessageDispatcher messageDispatcher) : base(workQueue, logger, messageDispatcher) { database = revisionAnalyzer.Database; this.revisionAnalyzer = revisionAnalyzer; this.changesetBuilder = changesetBuilder; this.messageDispatcher = messageDispatcher; }
private void statusTimer_Tick(object sender, EventArgs e) { statusLabel.Text = workQueue.LastStatus ?? "Idle"; timeLabel.Text = string.Format("Elapsed: {0:HH:mm:ss}", new DateTime(workQueue.ActiveTime.Ticks)); if (revisionAnalyzer != null) { fileLabel.Text = "Files: " + revisionAnalyzer.FileCount; revisionLabel.Text = "Revisions: " + revisionAnalyzer.RevisionCount; } if (changesetBuilder != null) { changeLabel.Text = "Changesets: " + changesetBuilder.Changesets.Count; if (changesetBuilder.Changesets.Count > 1) { AdvancedTaskbar.EnableProgress((uint)changesetBuilder.Changesets.Count); } } if (workQueue.IsIdle) { revisionAnalyzer = null; changesetBuilder = null; statusTimer.Enabled = false; if (!goButton.Enabled) { LoadRepoSettings(); } emailMap.Enabled = true; goButton.Enabled = true; AdvancedTaskbar.Disable(); cancelButton.Text = "Close"; if (goAndExit && exitOnComplete) { exitOnComplete = false; Close(); } } var exceptions = workQueue.FetchExceptions(); if (exceptions != null) { foreach (var exception in exceptions) { ShowException(exception); } } }
private void statusTimer_Tick(object sender, EventArgs e) { progressBar1.Value = workQueue.LastProgress; statusLabel.Text = workQueue.LastStatus ?? "Idle"; timeLabel.Text = string.Format("Elapsed: {0:HH:mm:ss}", new DateTime(workQueue.ActiveTime.Ticks)); if (revisionAnalyzer != null) { fileLabel.Text = "Files: " + revisionAnalyzer.FileCount; revisionLabel.Text = "Revisions: " + revisionAnalyzer.RevisionCount; } if (changesetBuilder != null) { changeLabel.Text = "Changesets: " + changesetBuilder.Changesets.Count; progressBar1.Maximum = changesetBuilder.Changesets.Count; progressBar1.Visible = true; } if (workQueue.IsIdle) { revisionAnalyzer = null; changesetBuilder = null; statusTimer.Enabled = false; goButton.Enabled = true; progressBar1.Visible = false; string[] args = Environment.GetCommandLineArgs(); if (autostart) { { Application.Exit(); } } } var exceptions = workQueue.FetchExceptions(); if (exceptions != null) { foreach (var exception in exceptions) { ShowException(exception); } } }
private void statusTimer_Tick(object sender, EventArgs e) { statusLabel.Text = workQueue.LastStatus ?? "Idle"; timeLabel.Text = string.Format("Elapsed: {0:HH:mm:ss}", new DateTime(workQueue.ActiveTime.Ticks)); if (revisionAnalyzer != null) { fileLabel.Text = "Files: " + revisionAnalyzer.FileCount; revisionLabel.Text = "Revisions: " + revisionAnalyzer.RevisionCount; } if (changesetBuilder != null) { changeLabel.Text = "Changesets: " + changesetBuilder.Changesets.Count; } if (workQueue.IsIdle) { projectAnalyzer = null; fileAnalyzer = null; revisionAnalyzer = null; changesetBuilder = null; statusTimer.Enabled = false; goButton.Enabled = true; } var exceptions = workQueue.FetchExceptions(); if (exceptions != null) { foreach (var exception in exceptions) { ShowException(exception); } } }
private void goButton_Click(object sender, EventArgs e) { try { OpenLog(logTextBox.Text); logger.WriteLine("VSS2Git version {0}", Assembly.GetExecutingAssembly().GetName().Version); WriteSettings(); Encoding encoding = Encoding.Default; EncodingInfo encodingInfo; if (codePages.TryGetValue(encodingComboBox.SelectedIndex, out encodingInfo)) { encoding = encodingInfo.GetEncoding(); } logger.WriteLine("VSS encoding: {0} (CP: {1}, IANA: {2})", encoding.EncodingName, encoding.CodePage, encoding.WebName); logger.WriteLine("Comment transcoding: {0}", transcodeCheckBox.Checked ? "enabled" : "disabled"); logger.WriteLine("Ignore errors: {0}", ignoreErrorsCheckBox.Checked ? "enabled" : "disabled"); var df = new VssDatabaseFactory(vssDirTextBox.Text); df.Encoding = encoding; var db = df.Open(); var path = vssProjectTextBox.Text; VssItem item; try { item = db.GetItem(path); } catch (VssPathException ex) { MessageBox.Show(ex.Message, "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var project = item as VssProject; if (project == null) { MessageBox.Show(path + " is not a project", "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } revisionAnalyzer = new RevisionAnalyzer(workQueue, logger, db); if (!string.IsNullOrEmpty(excludeTextBox.Text)) { revisionAnalyzer.ExcludeFiles = excludeTextBox.Text; } revisionAnalyzer.AddItem(project); changesetBuilder = new ChangesetBuilder(workQueue, logger, revisionAnalyzer); changesetBuilder.AnyCommentThreshold = TimeSpan.FromSeconds((double)anyCommentUpDown.Value); changesetBuilder.SameCommentThreshold = TimeSpan.FromSeconds((double)sameCommentUpDown.Value); changesetBuilder.BuildChangesets(); if (!string.IsNullOrEmpty(outDirTextBox.Text)) { var gitExporter = new GitExporter(workQueue, logger, revisionAnalyzer, changesetBuilder); if (!string.IsNullOrEmpty(domainTextBox.Text)) { gitExporter.EmailDomain = domainTextBox.Text; } if (!transcodeCheckBox.Checked) { gitExporter.CommitEncoding = encoding; } gitExporter.IgnoreErrors = ignoreErrorsCheckBox.Checked; gitExporter.ExportToGit(outDirTextBox.Text); } workQueue.Idle += delegate { logger.Dispose(); logger = Logger.Null; }; statusTimer.Enabled = true; goButton.Enabled = false; } catch (Exception ex) { ShowException(ex); } }
private static void RunFromCommandLine(ProgramOptions options) { var logger = string.IsNullOrEmpty(options.LogFile) ? Logger.Null : new Logger(options.LogFile); var workQueue = new WorkQueue(1); var messageDispatcher = new ConsoleLoggerMessageDispatcher(logger, options.IgnoreErrors); messageDispatcher.Dispatch(MessageType.Info, workQueue.LastStatus ?? "Idle", MessageChoice.Ok); var encoding = Encoding.GetEncoding(options.CodePage); var df = new VssDatabaseFactory(options.VssDirectory) { Encoding = encoding }; var db = df.Open(); var item = db.GetItem(options.VssProject); if (!(item is VssProject project)) { logger.WriteLine("Error: Not a vss project."); return; } var revisionAnalyzer = new RevisionAnalyzer(workQueue, logger, db, messageDispatcher); var changesetBuilder = new ChangesetBuilder(workQueue, logger, revisionAnalyzer, messageDispatcher) { AnyCommentThreshold = TimeSpan.FromSeconds(options.AnyCommentSeconds), SameCommentThreshold = TimeSpan.FromSeconds(options.SameCommentSeconds) }; void OnTimer(object state) { messageDispatcher.Dispatch(MessageType.Info, workQueue.LastStatus ?? "Idle", MessageChoice.Ok); messageDispatcher.Dispatch(MessageType.Info, $"Files: {revisionAnalyzer.FileCount}, Revisions: {revisionAnalyzer.RevisionCount}", MessageChoice.Ok); messageDispatcher.Dispatch(MessageType.Info, $"Changesets: {changesetBuilder.Changesets.Count}", MessageChoice.Ok); var exceptions = workQueue.FetchExceptions(); if (exceptions != null) { foreach (var exception in exceptions) { var message = ExceptionFormatter.Format(exception); logger.WriteLine("ERROR: {0}", message); logger.WriteLine(exception); } } } var timer = new Timer(OnTimer, null, TimeSpan.Zero, TimeSpan.FromSeconds(1)); if (!string.IsNullOrWhiteSpace(options.VssExcludePaths)) { revisionAnalyzer.ExcludeFiles = options.VssExcludePaths; } revisionAnalyzer.AddItem(project); changesetBuilder.BuildChangesets(); if (!string.IsNullOrEmpty(options.GitDirectory)) { var gitExporter = new GitExporter(workQueue, logger, revisionAnalyzer, changesetBuilder, messageDispatcher); if (!string.IsNullOrEmpty(options.DefaultEmailDomain)) { gitExporter.EmailDomain = options.DefaultEmailDomain; } if (!string.IsNullOrEmpty(options.EmailMapFile)) { if (File.Exists(options.EmailMapFile)) { gitExporter.EmailMapFile = options.EmailMapFile; } else { logger.WriteLine($"Warn: {options.EmailMapFile} does not exist."); } } if (!string.IsNullOrEmpty(options.DefaultComment)) { gitExporter.DefaultComment = options.DefaultComment; } if (!options.TranscodeComments) { gitExporter.CommitEncoding = encoding; } gitExporter.IgnoreErrors = options.IgnoreErrors; gitExporter.ExportToGit(options.GitDirectory); } workQueue.WaitIdle(); timer.Dispose(); messageDispatcher.Dispatch(MessageType.Info, "Done", MessageChoice.Ok); Application.Exit(); }
private void goButton_Click(object sender, EventArgs e) { try { OpenLog(logTextBox.Text); logger.WriteLine("VSS2Git version {0}", Assembly.GetExecutingAssembly().GetName().Version); WriteSettings(); Encoding encoding = Encoding.Default; EncodingInfo encodingInfo; if (codePages.TryGetValue(encodingComboBox.SelectedIndex, out encodingInfo)) { encoding = encodingInfo.GetEncoding(); } logger.WriteLine("VSS encoding: {0} (CP: {1}, IANA: {2})", encoding.EncodingName, encoding.CodePage, encoding.WebName); logger.WriteLine("Comment transcoding: {0}", transcodeCheckBox.Checked ? "enabled" : "disabled"); var df = new VssDatabaseFactory(vssDirTextBox.Text); df.Encoding = encoding; var db = df.Open(); var path = vssProjectTextBox.Text; VssItem item; try { item = db.GetItem(path); } catch (VssPathException ex) { MessageBox.Show(ex.Message, "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var project = item as VssProject; if (project == null) { MessageBox.Show(path + " is not a project", "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } revisionAnalyzer = new RevisionAnalyzer(workQueue, logger, db); if (!string.IsNullOrEmpty(excludeTextBox.Text)) { revisionAnalyzer.ExcludeFiles = excludeTextBox.Text; } revisionAnalyzer.AddItem(project); changesetBuilder = new ChangesetBuilder(workQueue, logger, revisionAnalyzer); changesetBuilder.AnyCommentThreshold = TimeSpan.FromSeconds((double) anyCommentUpDown.Value); changesetBuilder.SameCommentThreshold = TimeSpan.FromSeconds((double) sameCommentUpDown.Value); changesetBuilder.BuildChangesets(); if (!string.IsNullOrEmpty(outDirTextBox.Text)) { var gitExporter = new GitExporter(workQueue, logger, revisionAnalyzer, changesetBuilder); if (!string.IsNullOrEmpty(domainTextBox.Text)) { gitExporter.EmailDomain = domainTextBox.Text; } if (!transcodeCheckBox.Checked) { gitExporter.CommitEncoding = encoding; } gitExporter.ExportToGit(outDirTextBox.Text); } workQueue.Idle += delegate { logger.Dispose(); logger = Logger.Null; }; statusTimer.Enabled = true; goButton.Enabled = false; } catch (Exception ex) { ShowException(ex); CloseLog(); } }
private void statusTimer_Tick(object sender, EventArgs e) { statusLabel.Text = workQueue.LastStatus ?? "Idle"; timeLabel.Text = string.Format("Elapsed: {0:HH:mm:ss}", new DateTime(workQueue.ActiveTime.Ticks)); if (revisionAnalyzer != null) { fileLabel.Text = "Files: " + revisionAnalyzer.FileCount; revisionLabel.Text = "Revisions: " + revisionAnalyzer.RevisionCount; } if (changesetBuilder != null) { changeLabel.Text = "Changesets: " + changesetBuilder.Changesets.Count; } if (workQueue.IsIdle) { revisionAnalyzer = null; changesetBuilder = null; statusTimer.Enabled = false; goButton.Enabled = true; } var exceptions = workQueue.FetchExceptions(); if (exceptions != null) { foreach (var exception in exceptions) { ShowException(exception); } } }
private void goButton_Click(object sender, EventArgs e) { try { AdvancedTaskbar.EnableItermediate(); OpenLog(logTextBox.Text); logger.WriteLine("VSS2Git version {0}", Assembly.GetExecutingAssembly().GetName().Version); WriteSettings(); Encoding encoding = Encoding.Default; EncodingInfo encodingInfo; if (codePages.TryGetValue(encodingComboBox.SelectedIndex, out encodingInfo)) { encoding = encodingInfo.GetEncoding(); } logger.WriteLine("VSS encoding: {0} (CP: {1}, IANA: {2})", encoding.EncodingName, encoding.CodePage, encoding.WebName); logger.WriteLine("Comment transcoding: {0}", transcodeCheckBox.Checked ? "enabled" : "disabled"); logger.WriteLine("Ignore VCS errors: {0}", ignoreVcsErrorsCheckBox.Checked ? "enabled" : "disabled"); logger.WriteLine("Collapsing path of output directory", RemovePathTextBox.Text); var df = new VssDatabaseFactory(vssDirTextBox.Text); df.Encoding = encoding; var db = df.Open(); //start here string[] lines; // read the emails dictionary var emailDictionary = ReadDictionaryFile("e-mail dictionary", db.BasePath, emailPropertiesFileName); revisionAnalyzer = new RevisionAnalyzer(workQueue, logger, db); if (!string.IsNullOrEmpty(excludeTextBox.Text)) { revisionAnalyzer.ExcludeFiles = excludeTextBox.Text; } if (UseProjectsFile.Checked) { lines = File.ReadAllLines(ProjectsFileLocation.Text, Encoding.UTF8); foreach (String line in lines) { if (line.Length <= 0) { continue; } string[] variation = line.Split('='); string vssPath = variation[0]; //Here add the paths. VssProject item; try { item = (VssProject)db.GetItem(vssPath.Trim()); } catch (VssPathException ex) { MessageBox.Show(ex.Message, "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (variation.Length > 1) { item.RootPath = variation[1].Trim(); } else { item.RootPath = ""; } revisionAnalyzer.AddItem(item); } } else { var paths = vssProjectTextBox.Text.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (var path in paths) { VssItem item; try { item = db.GetItem(path.Trim()); } catch (VssPathException ex) { MessageBox.Show(ex.Message, "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var project = item as VssProject; if (project == null) { MessageBox.Show(path + " is not a project", "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } revisionAnalyzer.AddItem(project); } } changesetBuilder = new ChangesetBuilder(workQueue, logger, revisionAnalyzer); changesetBuilder.AnyCommentThreshold = TimeSpan.FromSeconds((double)anyCommentUpDown.Value); changesetBuilder.SameCommentThreshold = TimeSpan.FromSeconds((double)sameCommentUpDown.Value); changesetBuilder.BuildChangesets(); if (!string.IsNullOrEmpty(outDirTextBox.Text)) { IVcsWrapper vcsWrapper = CreateVcsWrapper(encoding); var vcsExporter = new VcsExporter(workQueue, logger, revisionAnalyzer, changesetBuilder, vcsWrapper, emailDictionary); if (!string.IsNullOrEmpty(domainTextBox.Text)) { vcsExporter.EmailDomain = domainTextBox.Text; } if (!string.IsNullOrEmpty(commentTextBox.Text)) { vcsExporter.DefaultComment = commentTextBox.Text; } if (!transcodeCheckBox.Checked) { vcsExporter.CommitEncoding = encoding; } vcsExporter.RemovePath = RemovePathTextBox.Text; vcsExporter.TryGenerateCommitMessage = tryGenerateCommitMessageCheckBox.Checked; vcsExporter.IgnoreVcsErrors = ignoreVcsErrorsCheckBox.Checked; vcsExporter.ResetRepo = resetRepoCheckBox.Checked; vcsExporter.FolderBeforeLabel = FolderBeforeLabel.Checked; vcsExporter.UseProjectsFile = UseProjectsFile.Checked; if (vcsExporter.ResetRepo) { vcsExporter.ExportToVcs(outDirTextBox.Text, null); } else { vcsExporter.ExportToVcs(outDirTextBox.Text, continueAfter); } } workQueue.Idle += delegate { logger.Dispose(); logger = Logger.Null; LoadRepoSettings(); }; statusTimer.Enabled = true; emailMap.Enabled = false; goButton.Enabled = false; cancelButton.Text = "Cancel"; } catch (Exception ex) { logger.Dispose(); logger = Logger.Null; ShowException(ex); } }
private void goButton_Click(object sender, EventArgs e) { try { AdvancedTaskbar.EnableItermediate(); OpenLog(logTextBox.Text); logger.WriteLine("VSS2Git version {0}", Assembly.GetExecutingAssembly().GetName().Version); WriteSettings(); Encoding encoding = Encoding.Default; EncodingInfo encodingInfo; if (codePages.TryGetValue(encodingComboBox.SelectedIndex, out encodingInfo)) { encoding = encodingInfo.GetEncoding(); } logger.WriteLine("VSS encoding: {0} (CP: {1}, IANA: {2})", encoding.EncodingName, encoding.CodePage, encoding.WebName); logger.WriteLine("Comment transcoding: {0}", transcodeCheckBox.Checked ? "enabled" : "disabled"); logger.WriteLine("Ignore VCS errors: {0}", ignoreVcsErrorsCheckBox.Checked ? "enabled" : "disabled"); var df = new VssDatabaseFactory(vssDirTextBox.Text); df.Encoding = encoding; var db = df.Open(); var path = vssProjectTextBox.Text; VssItem item; try { item = db.GetItem(path); } catch (VssPathException ex) { MessageBox.Show(ex.Message, "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var project = item as VssProject; if (project == null) { MessageBox.Show(path + " is not a project", "Invalid project path", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } // read the emails dictionary var emailDictionary = ReadDictionaryFile("e-mail dictionary", db.BasePath, emailPropertiesFileName); revisionAnalyzer = new RevisionAnalyzer(workQueue, logger, db); if (!string.IsNullOrEmpty(excludeTextBox.Text)) { revisionAnalyzer.ExcludeFiles = excludeTextBox.Text; } revisionAnalyzer.AddItem(project); changesetBuilder = new ChangesetBuilder(workQueue, logger, revisionAnalyzer); changesetBuilder.AnyCommentThreshold = TimeSpan.FromSeconds((double)anyCommentUpDown.Value); changesetBuilder.SameCommentThreshold = TimeSpan.FromSeconds((double)sameCommentUpDown.Value); changesetBuilder.BuildChangesets(); if (!string.IsNullOrEmpty(outDirTextBox.Text)) { IVcsWrapper vcsWrapper = CreateVcsWrapper(encoding); var vcsExporter = new VcsExporter(workQueue, logger, revisionAnalyzer, changesetBuilder, vcsWrapper, emailDictionary); if (!string.IsNullOrEmpty(domainTextBox.Text)) { vcsExporter.EmailDomain = domainTextBox.Text; } if (!string.IsNullOrEmpty(commentTextBox.Text)) { vcsExporter.DefaultComment = commentTextBox.Text; } if (!transcodeCheckBox.Checked) { vcsExporter.CommitEncoding = encoding; } vcsExporter.TryGenerateCommitMessage = tryGenerateCommitMessageCheckBox.Checked; vcsExporter.IgnoreVcsErrors = ignoreVcsErrorsCheckBox.Checked; vcsExporter.ResetRepo = resetRepoCheckBox.Checked; if (vcsExporter.ResetRepo) { vcsExporter.ExportToVcs(outDirTextBox.Text, null); } else { vcsExporter.ExportToVcs(outDirTextBox.Text, continueAfter); } } workQueue.Idle += delegate { logger.Dispose(); logger = Logger.Null; LoadRepoSettings(); }; statusTimer.Enabled = true; emailMap.Enabled = false; goButton.Enabled = false; cancelButton.Text = "Cancel"; } catch (Exception ex) { logger.Dispose(); logger = Logger.Null; ShowException(ex); } }