Skip to content

Commit

Permalink
Merge pull request #96 from GreyMerlin/master
Browse files Browse the repository at this point in the history
Eliminate old (and unfinished) Version Control feature
  • Loading branch information
sdottaka committed Sep 26, 2018
2 parents de10af0 + 587382a commit 79d460e
Show file tree
Hide file tree
Showing 68 changed files with 786 additions and 7,988 deletions.
99 changes: 0 additions & 99 deletions Src/CCPromptDlg.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions Src/CCPromptDlg.h

This file was deleted.

5 changes: 0 additions & 5 deletions Src/Common/PreferencesDlg.cpp
Expand Up @@ -50,7 +50,6 @@ CPreferencesDlg::CPreferencesDlg(COptionsMgr *regOptions, SyntaxColors *colors,
, m_pageEditor(regOptions)
, m_pageSystem(regOptions)
, m_pageBackups(regOptions)
, m_pageVss(regOptions)
, m_pageShell(regOptions)
, m_pageCompareFolder(regOptions)
, m_pageCompareBinary(regOptions)
Expand Down Expand Up @@ -108,7 +107,6 @@ BOOL CPreferencesDlg::OnInitDialog()
AddPage(&m_pageArchive, IDS_OPTIONSPG_ARCHIVE);
AddPage(&m_pageSystem, IDS_OPTIONSPG_SYSTEM);
AddPage(&m_pageBackups, IDS_OPTIONSPG_BACKUPS);
AddPage(&m_pageVss, IDS_OPTIONSPG_VERSIONCONTROL);
AddPage(&m_pageCodepage, IDS_OPTIONSPG_CODEPAGE);
AddPage(&m_pageShell, IDS_OPTIONSPG_SHELL);

Expand Down Expand Up @@ -269,7 +267,6 @@ void CPreferencesDlg::ReadOptions(bool bUpdate)
m_pageCompareImage.ReadOptions();
m_pageEditor.ReadOptions();
m_pageCodepage.ReadOptions();
m_pageVss.ReadOptions();
m_pageArchive.ReadOptions();
m_pageBackups.ReadOptions();
m_pageShell.ReadOptions();
Expand All @@ -288,7 +285,6 @@ void CPreferencesDlg::ReadOptions(bool bUpdate)
SafeUpdatePage(&m_pageCompareImage, FALSE);
SafeUpdatePage(&m_pageEditor, FALSE);
SafeUpdatePage(&m_pageCodepage, FALSE);
SafeUpdatePage(&m_pageVss, FALSE);
SafeUpdatePage(&m_pageArchive, FALSE);
SafeUpdatePage(&m_pageBackups, FALSE);
SafeUpdatePage(&m_pageShell, FALSE);
Expand All @@ -312,7 +308,6 @@ void CPreferencesDlg::SaveOptions()
m_pageSyntaxColors.WriteOptions();
m_pageMarkerColors.WriteOptions();
m_pageCodepage.WriteOptions();
m_pageVss.WriteOptions();
m_pageArchive.WriteOptions();
m_pageBackups.WriteOptions();
m_pageShell.WriteOptions();
Expand Down
2 changes: 0 additions & 2 deletions Src/Common/PreferencesDlg.h
Expand Up @@ -13,7 +13,6 @@
#include "PropGeneral.h"
#include "PropCompare.h"
#include "PropEditor.h"
#include "PropVss.h"
#include "PropRegistry.h"
#include "PropColors.h"
#include "PropTextColors.h"
Expand Down Expand Up @@ -57,7 +56,6 @@ class CPreferencesDlg : public CTrDialog
PropGeneral m_pageGeneral;
PropCompare m_pageCompare;
PropEditor m_pageEditor;
PropVss m_pageVss;
PropRegistry m_pageSystem;
PropCodepage m_pageCodepage;
PropMergeColors m_pageMergeColors;
Expand Down
1 change: 0 additions & 1 deletion Src/Common/RegKey.h
Expand Up @@ -21,7 +21,6 @@ class CRegKeyEx

// Operations
public:
HKEY GetKey() { return m_hKey; } // Only used by VssPrompt.cpp - can be removed?
void Close();
LONG Open(HKEY hKeyRoot, LPCTSTR pszPath);
LONG OpenWithAccess(HKEY hKeyRoot, LPCTSTR pszPath, REGSAM regsam);
Expand Down
2 changes: 1 addition & 1 deletion Src/DirActions.cpp
Expand Up @@ -292,7 +292,7 @@ uintptr_t FindItemFromPaths(const CDiffContext& ctxt, const PathContext& paths)
{
int nBuffer;
String file[3], path[3], base;
for (nBuffer = 0; nBuffer < paths.size(); ++nBuffer)
for (nBuffer = 0; nBuffer < static_cast<int>(paths.size()); ++nBuffer)
{
String p = paths[nBuffer];
file[nBuffer] = paths::FindFileName(p);
Expand Down
15 changes: 0 additions & 15 deletions Src/DirView.cpp
Expand Up @@ -30,7 +30,6 @@
#include "Merge.h"
#include "ClipBoard.h"
#include "DirActions.h"
#include "SourceControl.h"
#include "DirViewColItems.h"
#include "DirFrame.h" // StatePane
#include "DirDoc.h"
Expand Down Expand Up @@ -969,16 +968,9 @@ void CDirView::ConfirmAndPerformActions(FileActionScript & actionList)
/**
* @brief Perform an array of actions
* @note There can be only COPY or DELETE actions, not both!
* @sa SourceControl::SaveToVersionControl()
* @sa SourceControl::SyncFilesToVCS()
*/
void CDirView::PerformActionList(FileActionScript & actionScript)
{
// Reset suppressing VSS dialog for multiple files.
// Set in SourceControl::SaveToVersionControl().
theApp.m_pSourceControl->m_CheckOutMulti = false;
theApp.m_pSourceControl->m_bVssSuppressPathCheck = false;

// Check option and enable putting deleted items to Recycle Bin
if (GetOptionsMgr()->GetBool(OPT_USE_RECYCLE_BIN))
actionScript.UseRecycleBin(true);
Expand Down Expand Up @@ -1010,13 +1002,6 @@ void CDirView::UpdateAfterFileScript(FileActionScript & actionList)
// doesn't invalidate our item indexes.
FileActionItem act = actionList.RemoveTailActionItem();

// Synchronized items may need VCS operations
if (act.UIResult == FileActionItem::UI_SYNC)
{
if (theApp.m_pSourceControl->m_bCheckinVCS)
theApp.m_pSourceControl->CheckinToClearCase(act.dest);
}

// Update doc (difflist)
UPDATEITEM_TYPE updatetype = UpdateDiffAfterOperation(act, ctxt, GetDiffItem(act.context));
if (updatetype == UPDATEITEM_REMOVE)
Expand Down
49 changes: 0 additions & 49 deletions Src/FileActionScript.cpp
Expand Up @@ -29,7 +29,6 @@
#include "OptionsMgr.h"
#include "ShellFileOperations.h"
#include "paths.h"
#include "SourceControl.h"

using std::vector;

Expand Down Expand Up @@ -95,39 +94,6 @@ size_t FileActionScript::GetActionItemCount() const
return m_actions.size();
}

/**
* @brief Checkout file from VSS before synching (copying) it.
* @param [in] path Full path to a file.
* @param [in,out] bApplyToAll Apply user selection to all (selected)files?
* @return One of CreateScriptReturn values.
*/
int FileActionScript::VCSCheckOut(const String &path, BOOL &bApplyToAll)
{
String strErr;
int retVal = SCRIPT_SUCCESS;

if (GetOptionsMgr()->GetInt(OPT_VCS_SYSTEM) == SourceControl::VCS_NONE)
return retVal;

// TODO: First param is not used!
int nRetVal = theApp.SyncFileToVCS(path.c_str(), bApplyToAll, strErr);
if (nRetVal == -1)
{
retVal = SCRIPT_FAIL; // So we exit without file operations done
AfxMessageBox(strErr.c_str(), MB_OK | MB_ICONERROR);
}
else if (nRetVal == IDCANCEL)
{
retVal = SCRIPT_USERCANCEL; // User canceled, so we don't continue
}
else if (nRetVal == IDNO)
{
retVal = SCRIPT_USERSKIP; // User wants to skip this item
}

return retVal;
}

/**
* @brief Create ShellFileOperations operation lists from our scripts.
*
Expand Down Expand Up @@ -156,21 +122,6 @@ int FileActionScript::CreateOperationsScripts()
BOOL bSkip = FALSE;
if ((*iter).atype == FileAction::ACT_COPY && !(*iter).dirflag)
{
// Handle VCS checkout
// Before we can write over destination file, we must unlock
// (checkout) it. This also notifies VCS system that the file
// has been modified.
if (GetOptionsMgr()->GetInt(OPT_VCS_SYSTEM) != SourceControl::VCS_NONE)
{
int retVal = VCSCheckOut((*iter).dest, bApplyToAll);
if (retVal == SCRIPT_USERCANCEL)
bContinue = FALSE;
else if (retVal == SCRIPT_USERSKIP)
bSkip = TRUE;
else if (retVal == SCRIPT_FAIL)
bContinue = FALSE;
}

if (bContinue)
{
if (!theApp.CreateBackup(TRUE, (*iter).dest))
Expand Down
1 change: 0 additions & 1 deletion Src/FileActionScript.h
Expand Up @@ -133,7 +133,6 @@ class FileActionScript
String m_destBase; /**< Base destination path for some operations */

protected:
int VCSCheckOut(const String &path, BOOL &bApplyToAll);
int CreateOperationsScripts();
bool RunOp(ShellFileOperations *oplist, bool & userCancelled);

Expand Down
1 change: 0 additions & 1 deletion Src/MainFrm.h
Expand Up @@ -41,7 +41,6 @@ class SyntaxColors;
class LineFiltersList;
class TempFile;
struct FileLocation;
class SourceControl;
class DropHandler;

typedef std::shared_ptr<TempFile> TempFilePtr;
Expand Down

0 comments on commit 79d460e

Please sign in to comment.