Example #1
0
 protected override void OnRevert(FilePath[] localPaths, bool recurse, IProgressMonitor monitor)
 {
     foreach (FilePath localPath in localPaths)
     {
         Bazaar.Revert(localPath.FullPath, recurse, monitor, new BazaarRevision(this, BazaarRevision.HEAD));
     }
 }
Example #2
0
        protected override void OnRevertToRevision(FilePath localPath, Revision revision, IProgressMonitor monitor)
        {
            if (IsModified(BazaarRepository.GetLocalBasePath(localPath)))
            {
                MessageDialog md = new MessageDialog(null, DialogFlags.Modal,
                                                     MessageType.Question, ButtonsType.YesNo,
                                                     GettextCatalog.GetString("You have uncommitted local changes. Revert anyway?"));
                try
                {
                    if ((int)ResponseType.Yes != md.Run())
                    {
                        return;
                    }
                }
                finally
                {
                    md.Destroy();
                }
            }

            BazaarRevision brev = (null == revision) ? new BazaarRevision(this, BazaarRevision.HEAD) : (BazaarRevision)revision;

            Bazaar.Revert(localPath.FullPath, true, monitor, brev);
        }