示例#1
0
		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);
		}
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }
示例#4
0
 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);
     }
 }
示例#5
0
 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);
     }
 }
示例#6
0
            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;
                }
            }