Beispiel #1
0
        private void UndoChanges(IFileStatusEntry fileStatusEntry)
        {
            Logger.Trace("Undoing changes to file {0}", fileStatusEntry.FilePath);

            try
            {
                var localLocation = Provider.CurrentRepository.LocalLocation.EndsWith("\\")
                    ? Provider.CurrentRepository.LocalLocation
                    : Provider.CurrentRepository.LocalLocation + "\\";

                Provider.Undo(localLocation + fileStatusEntry.FilePath);

                RefreshView();
            }
            catch (SourceControlException ex)
            {
                RaiseErrorEvent(ex.Message, ex.InnerException, NotificationType.Error);
            }
            catch
            {
                RaiseErrorEvent(RubberduckUI.SourceControl_UnknownErrorTitle,
                                RubberduckUI.SourceControl_UnknownErrorMessage, NotificationType.Error);
                throw;
            }
        }
Beispiel #2
0
        private void ExcludeChanges(IFileStatusEntry fileStatusEntry)
        {
            Logger.Trace("Adding file {0} to excluded changes", fileStatusEntry.FilePath);
            ExcludedChanges.Add(fileStatusEntry);

            RefreshView();
        }
        private void IncludeChanges(IFileStatusEntry fileStatusEntry)
        {
            if (UntrackedFiles.FirstOrDefault(f => f.FilePath == fileStatusEntry.FilePath) != null)
            {
                Provider.AddFile(fileStatusEntry.FilePath);
            }
            else
            {
                ExcludedChanges.Remove(ExcludedChanges.FirstOrDefault(f => f.FilePath == fileStatusEntry.FilePath));
            }

            RefreshView();
        }
Beispiel #4
0
        private void IncludeChanges(IFileStatusEntry fileStatusEntry)
        {
            if (UntrackedFiles.FirstOrDefault(f => f.FilePath == fileStatusEntry.FilePath) != null)
            {
                Logger.Trace("Tracking file {0}", fileStatusEntry.FilePath);
                Provider.AddFile(fileStatusEntry.FilePath);
            }
            else
            {
                Logger.Trace("Removing file {0} from excluded changes", fileStatusEntry.FilePath);
                ExcludedChanges.Remove(ExcludedChanges.FirstOrDefault(f => f.FilePath == fileStatusEntry.FilePath));
            }

            RefreshView();
        }
        private void UndoChanges(IFileStatusEntry fileStatusEntry)
        {
            try
            {
                var localLocation = Provider.CurrentRepository.LocalLocation.EndsWith("\\")
                    ? Provider.CurrentRepository.LocalLocation
                    : Provider.CurrentRepository.LocalLocation + "\\";

                Provider.Undo(localLocation + fileStatusEntry.FilePath);

                RefreshView();
            }
            catch (SourceControlException ex)
            {
                RaiseErrorEvent(ex.Message, ex.InnerException.Message);
            }
        }
        private void UndoChanges(IFileStatusEntry fileStatusEntry)
        {
            Logger.Trace("Undoing changes to file {0}", fileStatusEntry.FilePath);

            try
            {
                var file = Path.GetFileName(fileStatusEntry.FilePath);
                Debug.Assert(!string.IsNullOrEmpty(file));
                Provider.Undo(Path.Combine(Provider.CurrentRepository.LocalLocation, file));
                RefreshView();
            }
            catch (SourceControlException ex)
            {
                RaiseErrorEvent(ex.Message, ex.InnerException, NotificationType.Error);
            }
            catch
            {
                RaiseErrorEvent(RubberduckUI.SourceControl_UnknownErrorTitle,
                                RubberduckUI.SourceControl_UnknownErrorMessage, NotificationType.Error);
                throw;
            }
        }
        private void ExcludeChanges(IFileStatusEntry fileStatusEntry)
        {
            ExcludedChanges.Add(fileStatusEntry);

            RefreshView();
        }
        private void ExcludeChanges(IFileStatusEntry fileStatusEntry)
        {
            ExcludedChanges.Add(fileStatusEntry);

            RefreshView();
        }
        private void IncludeChanges(IFileStatusEntry fileStatusEntry)
        {
            if (UntrackedFiles.FirstOrDefault(f => f.FilePath == fileStatusEntry.FilePath) != null)
            {
                Provider.AddFile(fileStatusEntry.FilePath);
            }
            else
            {
                ExcludedChanges.Remove(ExcludedChanges.FirstOrDefault(f => f.FilePath == fileStatusEntry.FilePath));
            }

            RefreshView();
        }
        private void UndoChanges(IFileStatusEntry fileStatusEntry)
        {
            try
            {
                var localLocation = Provider.CurrentRepository.LocalLocation.EndsWith("\\")
                    ? Provider.CurrentRepository.LocalLocation
                    : Provider.CurrentRepository.LocalLocation + "\\";

                Provider.Undo(localLocation + fileStatusEntry.FilePath);

                RefreshView();
            }
            catch (SourceControlException ex)
            {
                RaiseErrorEvent(ex.Message, ex.InnerException.Message);
            }
        }