Ejemplo n.º 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);
		}
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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;
                }
            }