void RevertRevisionClicked (object src, EventArgs args) { Revision d = SelectedRevision; if (RevertRevisionsCommands.RevertRevision (info.Repository, info.Item.Path, d, false)) VersionControlService.SetCommitComment (info.Item.Path, string.Format ("(Revert revision {0})", d.ToString ()), true); }
void RevertToRevisionClicked(object src, EventArgs args) { Revision d = SelectedRevision; if (RevertRevisionsCommands.RevertToRevision(info.Repository, info.Item.Path, d, false)) { VersionControlService.SetCommitComment(info.Item.Path, GettextCatalog.GetString("(Revert to revision {0})", d.ToString()), true); } }
void RevertRevisionClicked(object src, EventArgs args) { Revision d = GetSelectedRev(); if (RevertRevisionsCommands.RevertRevision(vc, filepath, d, false)) { VersionControlService.SetCommitComment(filepath, string.Format("(Revert revision {0})", d.ToString()), true); } }
async void RevertRevisionClicked(object src, EventArgs args) { try { Revision d = SelectedRevision; if (await RevertRevisionsCommands.RevertRevisionAsync(info.Repository, info.Item.Path, d, false)) { VersionControlService.SetCommitComment(info.Item.Path, GettextCatalog.GetString("(Revert revision {0})", d.ToString()), true); } } catch (Exception e) { LoggingService.LogInternalError(e); } }
void SetCommitMessage(string file, string text) { if (text.Length > 0) { ChangeSetItem item = changeSet.GetFileItem(file); if (item == null) { item = changeSet.AddFile(file); } item.Comment = text; } else { VersionControlService.SetCommitComment(file, text, true); } }
protected override async Task RunAsync() { success = true; try { // store global comment before commit. VersionControlService.SetCommitComment(changeSet.BaseLocalPath, changeSet.GlobalComment, true); await vc.CommitAsync(changeSet, Monitor); Monitor.ReportSuccess(GettextCatalog.GetString("Commit operation completed.")); // Reset the global comment on successful commit. VersionControlService.SetCommitComment(changeSet.BaseLocalPath, "", true); } catch (Exception ex) { LoggingService.LogError("Commit operation failed", ex); Monitor.ReportError(ex.Message, null); success = false; throw; } }