Changeset 3ee00e4c0a30…
Parent 3dd57d56e9c5…
by
Changes to 47 files · Browse files at 3ee00e4c0a30 Showing diff from parent 3dd57d56e9c5 Diff from another changeset...
|
@@ -1,89 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-// Copyright (C) 2009 Benjamin Pollack
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "Dirstate.h"
-#include "TortoiseUtils.h"
-
-CAutoPtr<CDirstate> CDirstate::Read(const CString& strPath, bool& bUnset)
-{
- bUnset = false;
-
- CAtlFile file;
- if (FAILED(file.Create(strPath, GENERIC_READ,
- FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING)))
- {
- ATLTRACE("Dirstate::read: can't open '%s'\n", (LPCTSTR)strPath);
- return CAutoPtr<CDirstate>(NULL);
- }
-
- CAutoPtr<CDirstate> pd(new CDirstate());
-
- file.Read(&pd->m_szParent1, HASH_LENGTH * sizeof(char));
- file.Read(&pd->m_szParent2, HASH_LENGTH * sizeof(char));
-
- CDirentry e;
- CString strRelPath;
- while (e.Read(file, strRelPath))
- {
- if (e.Unset()) bUnset = true;
- if (e.m_chState == 'a') ++pd->m_nNumAdded;
-
- pd->Add(strRelPath, e);
- }
-
- file.Close();
- return pd;
-}
-
-static char *RevHashString(const char achRevHash[HASH_LENGTH])
-{
- static char szRevString[HASH_LENGTH * 2 + 1];
- static LPCTSTR lpszHexVal = "0123456789abcdef";
- for (int i = 0; i < HASH_LENGTH; ++i)
- {
- szRevString[i * 2] = lpszHexVal[(achRevHash[i] >> 4) & 0xf];
- szRevString[i * 2 + 1] = lpszHexVal[achRevHash[i] & 0xf];
- }
- szRevString[HASH_LENGTH * 2] = 0;
- return szRevString;
-}
-
-void TestRead()
-{
- bool bUnset;
- CAutoPtr<CDirstate> pDirstate = CDirstate::Read(".hg/dirstate", bUnset);
- if ((CDirstate*)pDirstate == NULL)
- {
- printf("error: could not read .hg/dirstate\n");
- return;
- }
- printf("parent1: %s\n", RevHashString(pDirstate->m_szParent1));
- printf("parent2: %s\n", RevHashString(pDirstate->m_szParent2));
- printf("entries: %d\n\n", pDirstate->Size());
-
- pDirstate->Root().Print();
-}
-
-#ifdef APPMAIN
-int main(int argc, char *argv[])
-{
- TestRead();
- return 0;
-}
-#endif
|
|
@@ -1,50 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-// Copyright (C) 2009 Benjamin Pollack
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-#include "Directory.h"
-
-#define HASH_LENGTH 20
-
-class CDirstate
-{
- CDirectory m_dirRoot;
-
- unsigned m_nNumAdded; // number of entries that have state 'a'
- unsigned m_nNumEntries;
-
-public:
- char m_szParent1[HASH_LENGTH];
- char m_szParent2[HASH_LENGTH];
-
- static CAutoPtr<CDirstate> Read(const CString& strPath, bool& bUnset);
-
- CDirectory& Root() { return m_dirRoot; }
-
- void Add(const CString& strRelPath, CDirentry& rEntry)
- {
- m_dirRoot.Add(strRelPath, rEntry);
- ++m_nNumEntries;
- }
-
- unsigned NumAdded() const { return m_nNumAdded; }
- unsigned Size() const { return m_nNumEntries; }
-
-private:
- CDirstate() :
- m_dirRoot(0, "", ""), m_nNumAdded(0), m_nNumEntries(0) {}
-};
|
|
|
@@ -1,171 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-// Copyright (C) 2009 Benjamin Pollack
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "Dirstatecache.h"
-#include "Dirstate.h"
-#include "THgStatus.h"
-#include "Winstat.h"
-
-CAtlList<CDirstateCache::CEntry>& CDirstateCache::Cache()
-{
- static CAtlList<CDirstateCache::CEntry> c;
- return c;
-}
-
-CDirstate* CDirstateCache::Get(const CString& strHgRoot, const CString& strCwd,
- bool& bUnset, bool bUseKbfiles)
-{
- bUnset = false;
-
- POSITION position = Cache().GetHeadPosition();
- while (position != NULL)
- {
- CEntry& rItem = Cache().GetAt(position);
- if (strHgRoot == rItem.strHgRoot && bUseKbfiles == rItem.bUseKbfiles) break;
- Cache().GetNext(position);
- }
-
- CWinstat stat;
- CString strPath = strHgRoot + (bUseKbfiles ? "\\.hg\\kilnbfiles\\dirstate"
- : "\\.hg\\dirstate");
-
- unsigned tc = ::GetTickCount();
- bool bNewStat = false;
-
- if (position == NULL)
- {
- if (stat.lstat(strPath, true) != 0)
- {
- ATLTRACE("CDirstateCache::get: lstat('%s') failed\n", (LPCTSTR)strPath);
- return 0;
- }
- ATLTRACE("CDirstateCache::get: lstat('%s') ok\n", (LPCTSTR)strPath);
- bNewStat = true;
-
- if (Cache().GetCount() >= 10)
- {
- CEntry e = Cache().RemoveTail();
- ATLTRACE("CDirstateCache::get: dropping '%s'\n", (LPCTSTR)e.strHgRoot);
- delete e.pDirstate;
- }
-
- CEntry e;
- e.strHgRoot = strHgRoot;
- e.bUseKbfiles = bUseKbfiles;
- e.uTickCount = tc;
- Cache().AddHead(e);
- position = Cache().GetHeadPosition();
- }
-
- CEntry& rItem = Cache().GetAt(position);
- if (!bNewStat && tc - rItem.uTickCount > 500)
- {
- if (0 != stat.lstat(strPath, true))
- {
- ATLTRACE("CDirstateCache::get: lstat('%s') failed\n", (LPCTSTR)strPath);
- ATLTRACE("CDirstateCache::get: dropping '%s'\n", (LPCTSTR)rItem.strHgRoot);
- delete rItem.pDirstate;
- Cache().RemoveAt(position);
- return 0;
- }
- rItem.uTickCount = tc;
- ATLTRACE("CDirstateCache::get: lstat('%s') ok\n", (LPCTSTR)strPath);
- bNewStat = true;
- }
-
- if (rItem.pDirstate)
- {
- bUnset = rItem.bUnset;
-
- if (!bNewStat) return rItem.pDirstate;
-
- if (rItem.llMTime == stat.ullMTime && rItem.llSize == stat.ullSize)
- {
- return rItem.pDirstate;
- }
-
- ATLTRACE("CDirstateCache::get: refreshing '%s'\n", (LPCTSTR)strHgRoot);
- }
- else
- {
- ATLTRACE("CDirstateCache::get: reading '%s'\n", (LPCTSTR)strHgRoot);
- }
-
- bUnset = false;
- unsigned tc0 = ::GetTickCount();
- CAutoPtr<CDirstate> ds = CDirstate::Read(strPath, bUnset);
- unsigned tc1 = ::GetTickCount();
-
- bool bRequestTHgStatusUpdate = true;
-
- if (bUnset)
- {
- if (rItem.bUnset)
- {
- ATLTRACE("CDirstateCache::get: **** old and new have unset entries\n");
- bRequestTHgStatusUpdate = false;
- }
- else
- {
- ATLTRACE("CDirstateCache::get: new has unset entries\n");
- }
- }
-
- rItem.bUnset = bUnset;
-
- delete rItem.pDirstate;
- rItem.pDirstate = ds.Detach();
-
- unsigned delta = tc1 - tc0;
- ATLTRACE("CDirstateCache::get: read done in %d ticks, %d repos in cache\n",
- delta, Cache().GetCount());
-
- rItem.llMTime = stat.ullMTime;
- rItem.llSize = stat.ullSize;
-
- if (bRequestTHgStatusUpdate)
- {
- ATLTRACE("CDirstateCache::get: calling Thgstatus::update\n");
- CTHgStatus::Update(strCwd);
- }
- else
- {
- ATLTRACE("CDirstateCache::get: omitting Thgstatus::update\n");
- }
-
- return rItem.pDirstate;
-}
-
-void CDirstateCache::Invalidate(const CString& strHgRoot, bool bUseKbfiles)
-{
- if (strHgRoot.IsEmpty()) return;
-
- POSITION position = Cache().GetHeadPosition();
- while (position != NULL)
- {
- CEntry& rItem = Cache().GetAt(position);
- if (strHgRoot == rItem.strHgRoot && bUseKbfiles == rItem.bUseKbfiles)
- {
- delete rItem.pDirstate;
- Cache().RemoveAt(position);
- ATLTRACE("Dirstatecache::invalidate('%s')\n", (LPCTSTR)strHgRoot);
- break;
- }
- }
-}
|
|
@@ -1,50 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-// Copyright (C) 2009 Benjamin Pollack
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-class CDirstate;
-
-class CDirstateCache
-{
- struct CEntry
- {
- CDirstate* pDirstate;
- LONGLONG llMTime;
- LONGLONG llSize;
-
- CString strHgRoot;
- unsigned uTickCount;
- bool bUnset;
- bool bUseKbfiles;
-
- CEntry() :
- pDirstate(0),
- llMTime(0),
- llSize(0),
- uTickCount(0),
- bUnset(false),
- bUseKbfiles(false) {}
- };
-
- static CAtlList<CEntry>& Cache();
-
-public:
- static CDirstate* Get(const CString& strHgRoot, const CString& strCwd,
- bool& bUnset, bool bUseKbfiles = false);
- static void Invalidate(const CString& strHgRoot, bool bUseKbfiles = false);
-};
|
|
|
@@ -1,225 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "GlobalData.h"
-
-// According to http://msdn.microsoft.com/en-us/library/bb776094%28VS.85%29.aspx
-// the help texts for the commands should be reasonably short (under 40 characters)
-
-const CMenuDescription MenuDescList[] =
-{
- { "commit", L"Commit...",
- L"Commits changes in repository.",
- "menucommit.ico", 0},
- { "init", L"Create Repository Here",
- L"Creates a new repository.",
- "menucreaterepos.ico", 0},
- { "clone", L"Clone...",
- L"Creates a clone of a repository.",
- "menuclone.ico", 0},
- { "shelve", L"Shelve Changes",
- L"Shelves or unshelves file changes.",
- "shelve.ico", 0},
- { "status", L"View File Status",
- L"Shows repository status and changes.",
- "menushowchanged.ico", 0},
- { "add", L"Add Files...",
- L"Adds files to version control.",
- "menuadd.ico", 0},
- { "revert", L"Revert Files...",
- L"Reverts file changes.",
- "menurevert.ico", 0},
- { "remove", L"Remove Files...",
- L"Removes files from version control.",
- "menudelete.ico", 0},
- { "rename", L"Rename File...",
- L"Renames the file or directory.",
- "general.ico", 0},
- { "workbench", L"Workbench",
- L"Shows the change history of the repository.",
- "menulog.ico", 0},
- { "log", L"Revision History",
- L"Shows the change history of the selected files.",
- "menulog.ico", 0},
- { "synch", L"Synchronize",
- L"Synchronizes with a remote repository.",
- "menusynch.ico", 0},
- { "serve", L"Web Server",
- L"Starts the web server for this repository.",
- "proxy.ico", 0},
- { "update", L"Update...",
- L"Updates the working directory.",
- "menucheckout.ico", 0},
- { "thgstatus", L"Update Icons",
- L"Updates icons for this repository.",
- "refresh_overlays.ico", 0},
- { "userconf", L"Global Settings",
- L"Configures user wide settings.",
- "settings_user.ico", 0},
- { "repoconf", L"Repository Settings",
- L"Configures repository settings.",
- "settings_repo.ico", 0},
- { "about", L"About TortoiseHg",
- L"Shows the about dialog.",
- "menuabout.ico", 0},
- { "annotate", L"Annotate Files",
- L"Shows changeset information per file line.",
- "menublame.ico", 0},
- { "vdiff", L"Visual Diff",
- L"Shows changes using the GUI diff tool.",
- "TortoiseMerge.ico", 0},
- { "hgignore", L"Edit Ignore Filter",
- L"Edits the repository ignore filter.",
- "ignore.ico", 0},
- { "guess", L"Guess Renames",
- L"Detects renames and copies.",
- "detect_rename.ico", 0},
- { "grep", L"Search History",
- L"Searches file revisions for patterns.",
- "menurepobrowse.ico", 0},
- { "forget", L"Forget Files...",
- L"Removes files from version control.",
- "menudelete.ico", 0},
- { "shellconf", L"Explorer Extension Settings",
- L"Configures the Explorer extension.",
- "settings_repo.ico", 0},
- { "kiln", L"Kiln",
- L"Opens the current repository in Kiln.",
- "kiln.ico", 0 },
- { "kilnfiles", L"Kiln",
- L"Opens the selected files in Kiln.",
- "kiln.ico", 0 },
- { "keyboard", L"Keyboard Help",
- L"Displays a list of keyboard shortcuts.",
- "", 0 },
-
- // Add new items here.
- // Template:
- // { "cmdname", L"Display Name",
- // L"Status bar prompt.",
- // "iconfile.ico", 0 },
-};
-const int MenuDescListCount = sizeof(MenuDescList) / sizeof(CMenuDescription);
-
-// Menu commands shown when the folder is in a repository but no files are selected
-const LPCTSTR RepoNoFilesMenu[] =
-{
- "commit",
- "status",
- "shelve",
- "vdiff",
- NULL,
- "add",
- "revert",
- "rename",
- "forget",
- "remove",
- NULL,
- "workbench",
- "update",
- "grep",
- NULL,
- "kiln",
- NULL,
- "synch",
- "serve",
- "clone",
- "init"
- "thgstatus",
- NULL,
- "hgignore",
- "guess",
- NULL,
- "shellconf",
- "repoconf",
- "userconf",
- NULL,
- "keyboard",
- "about",
-};
-const int RepoNoFilesMenuCount = sizeof(RepoNoFilesMenu) / sizeof(LPCTSTR);
-
-// Menu commands shown when the folder is in a repository and files are selected
-const LPCTSTR RepoFilesMenu[] =
-{
- "commit",
- "status",
- "vdiff",
- NULL,
- "add",
- "revert",
- "rename",
- "forget",
- "remove",
- NULL,
- "log",
- "annotate",
- NULL,
- "kilnfiles",
- NULL,
- "keyboard",
- "about",
-};
-const int RepoFilesMenuCount = sizeof(RepoFilesMenu) / sizeof(LPCTSTR);
-
-// Menu commands shown when the folder is not in a repository
-const LPCTSTR NoRepoMenu[] =
-{
- "clone",
- "init",
- "shellconf",
- "userconf",
- "thgstatus",
- NULL,
- "workbench",
- NULL,
- "keyboard",
- "about",
-};
-const int NoRepoMenuCount = sizeof(NoRepoMenu) / sizeof(LPCTSTR);
-
-const LPCTSTR DefaultPromotedString = "commit,workbench,kiln,kilnfiles";
-
-// List of all keyboard shortcuts
-const CKeyShortcut KeyShortcutList[] =
-{
- { "add", VK_INSERT, KSF_ALT },
- { "remove", VK_DELETE, KSF_ALT },
- { "commit", 'C', KSF_CONTROL | KSF_SHIFT },
- { "forget", 'F', KSF_CONTROL | KSF_SHIFT },
- { "rename", 'M', KSF_CONTROL | KSF_SHIFT },
- { "synch", 'S', KSF_CONTROL | KSF_SHIFT },
- { "update", 'U', KSF_CONTROL | KSF_SHIFT },
- { "revert", 'V', KSF_CONTROL | KSF_SHIFT },
- { "workbench", 'W', KSF_CONTROL | KSF_SHIFT },
-};
-const int KeyShortcutListCount = sizeof(KeyShortcutList) / sizeof(CKeyShortcut);
-
-// Message displayed if the user tries to delete the internal .hg directory
-const LPCWSTR DeleteHgMessage = L"The folder you are attempting to delete, .hg, is used "
- L"internally by Mercurial to store the history of this repository. If you delete "
- L"this folder, your code will no longer be treated as a source code control "
- L"repository by Mercurial. If you do no have a backup copy of the repository "
- L"elsewhere, its history will be lost permanently. Are you sure that you want to "
- L"delete the .hg folder?";
-const LPCWSTR DeleteHgTitle = L"TortoiseHg Warning";
-
-// Message displayed if the user tries to delete the internal .kbf directory
-const LPCWSTR DeleteKbfMessage = L"The folder you are attempting to delete, .kbf, is "
- L"used internally by the kbfiles extension to Mercurial. Deleting it will corrupt "
- L"your repository. Are you sure that you want to delete the .kbf folder?";
-const LPCWSTR DeleteKbfTitle = L"TortoiseHg Warning";
|
|
@@ -1,58 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-struct CMenuDescription
-{
- CString strName;
- CStringW strMenuText;
- CStringW strHelpText;
- CString strIconName;
- UINT idCmd;
-};
-
-// Context menu data
-extern const CMenuDescription MenuDescList[];
-extern const int MenuDescListCount;
-extern const LPCTSTR RepoNoFilesMenu[];
-extern const int RepoNoFilesMenuCount;
-extern const LPCTSTR RepoFilesMenu[];
-extern const int RepoFilesMenuCount;
-extern const LPCTSTR NoRepoMenu[];
-extern const int NoRepoMenuCount;
-extern const LPCTSTR DefaultPromotedString;
-
-// Keyboard shortcut flags
-#define KSF_ALT 0x0001
-#define KSF_CONTROL 0x0002
-#define KSF_SHIFT 0x0004
-
-struct CKeyShortcut
-{
- CString strName;
- WORD wKey;
- WORD wFlags;
-};
-
-// Keyboard shortcut data
-extern const CKeyShortcut KeyShortcutList[];
-extern const int KeyShortcutListCount;
-
-// Warning messages displayed by the copy hook
-extern const LPCWSTR DeleteHgMessage;
-extern const LPCWSTR DeleteHgTitle;
-extern const LPCWSTR DeleteKbfMessage;
-extern const LPCWSTR DeleteKbfTitle;
|
|
|
@@ -1,116 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "KeyboardHelpDialog.h"
-#include "RegistryConfig.h"
-#include "GlobalData.h"
-
-static CString GetKeyName(UINT uKey, bool bExtended = false)
-{
- UINT uScanCode = ::MapVirtualKey(uKey, MAPVK_VK_TO_VSC);
- LONG lParam = (LONG)uScanCode << 16;
-
- // Adding this flag prevents a distinction from being made between the left and
- // right Alt, Control, or Shift keys.
- lParam |= (1 << 25);
-
- // Adding this flag is necessary for certain keys (e.g. Insert, Delete) to be
- // handled properly. However, it prevents other keys (e.g. Shift) from being
- // handled properly. Therefore, only use it when necessary.
- if (bExtended) lParam |= (1 << 24);
-
- // Get the name of the key.
- TCHAR szKeyName[20];
- ::GetKeyNameText(lParam, szKeyName, 20);
- return szKeyName;
-}
-
-static CStringW LookupMenuText(CString strName, CString strLang)
-{
- // Search the context menu list to find the menu text for the specified command.
- // Then, attempt to find a localized string in the registry.
- for (int i = 0; i < MenuDescListCount; i++)
- {
- if (MenuDescList[i].strName == strName)
- {
- CStringW strMenuText = MenuDescList[i].strMenuText;
- if (!strLang.IsEmpty())
- {
- CStringW strDummy;
- GetCMenuTranslation(strLang, MenuDescList[i].strName, strMenuText,
- strDummy);
- }
- if (strMenuText.Right(3) == "...")
- {
- // Strip off any trailing ellipsis from the name.
- strMenuText.Truncate(strMenuText.GetLength() - 3);
- }
- return strMenuText;
- }
- }
- return "";
-}
-
-LRESULT CKeyboardHelpDialog::OnInitDialog(UINT, WPARAM, LPARAM, BOOL&)
-{
- CenterWindow();
-
- // Attempt to load localized dialog strings if they exist.
- CString strLang;
- GetRegistryConfig("CMenuLang", strLang);
- if (!strLang.IsEmpty())
- {
- CStringW strMenuText;
- CStringW strHelpText;
- GetCMenuTranslation(strLang, "keyboarddialog", strMenuText, strHelpText);
- if (!strMenuText.IsEmpty()) ::SetWindowTextW(m_hWnd, strMenuText);
- if (!strHelpText.IsEmpty()) ::SetDlgItemTextW(m_hWnd, IDC_TOPTEXT, strHelpText);
- }
-
- // Set tab stops for the list box.
- int nTabStop = 100;
- SendDlgItemMessage(IDC_KEYLIST, LB_SETTABSTOPS, 1, (LPARAM)&nTabStop);
-
- // Get the names of the Alt, Control, and Shift keys.
- CString strAlt = GetKeyName(VK_MENU);
- CString strControl = GetKeyName(VK_CONTROL);
- CString strShift = GetKeyName(VK_SHIFT);
- strAlt += '+';
- strControl += '+';
- strShift += '+';
-
- // Add each keyboard shortcut to the list box.
- for (int i = 0; i < KeyShortcutListCount; i++)
- {
- CString strKey;
- WORD wFlags = KeyShortcutList[i].wFlags;
- if (wFlags & KSF_CONTROL) strKey += strControl;
- if (wFlags & KSF_ALT) strKey += strAlt;
- if (wFlags & KSF_SHIFT) strKey += strShift;
- strKey += GetKeyName(KeyShortcutList[i].wKey, true);
- strKey += '\t';
- strKey += LookupMenuText(KeyShortcutList[i].strName, strLang);
- SendDlgItemMessage(IDC_KEYLIST, LB_ADDSTRING, 0, (LPARAM)(LPCTSTR)strKey);
- }
- return 1L;
-}
-
-LRESULT CKeyboardHelpDialog::OnOK(WORD, WORD, HWND, BOOL&)
-{
- EndDialog(IDOK);
- return 1L;
-}
|
|
@@ -1,30 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-class CKeyboardHelpDialog : public CDialogImpl<CKeyboardHelpDialog>
-{
-public:
- enum { IDD = IDD_KEYBOARDHELP };
-
- BEGIN_MSG_MAP(CKeyboardHelpDialog)
- MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
- COMMAND_HANDLER(IDOK, BN_CLICKED, OnOK)
- END_MSG_MAP()
-
- LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
-};
|
|
@@ -1,79 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "Kiln.h"
-#include "QueryDirstate.h"
-
-bool KilnGetUrl(const CString& strPath, CString* pstrKilnUrl)
-{
- CString strHgRoot;
- if (!GetHgRoot(strPath, strHgRoot)) return false;
-
- // Try to get the default path from hgrc.
- CString strHgrcPath = strHgRoot + "\\.hg\\hgrc";
- CString strDefaultPath;
- LPTSTR lpszBuf = strDefaultPath.GetBuffer(MAX_PATH + 1);
- DWORD nSize = ::GetPrivateProfileString("paths", "default", "", lpszBuf,
- MAX_PATH, strHgrcPath);
- strDefaultPath.ReleaseBuffer(nSize);
- if (strDefaultPath.IsEmpty()) return false;
-
- // Check whether the repository is a Kiln repository.
- CString strLower = strDefaultPath;
- strLower.MakeLower();
- if (strLower.Find("kilnhg.com/") == -1 && strLower.Find("/kiln/") == -1)
- {
- return false;
- }
-
- if (pstrKilnUrl != NULL) *pstrKilnUrl = strDefaultPath;
- return true;
-}
-
-void KilnOpenRepo(HWND hWnd, const CString& strPath)
-{
- CString strKilnUrl;
- if (KilnGetUrl(strPath, &strKilnUrl))
- {
- // Open the repository in the default web browser
- ::ShellExecute(hWnd, NULL, strKilnUrl, NULL, NULL, SW_SHOW);
- }
-}
-
-void KilnOpenFiles(HWND hWnd, const CString& strPath, const CAtlList<CString>& listFiles)
-{
- CString strKilnUrl;
- if (KilnGetUrl(strPath, &strKilnUrl))
- {
- if (strKilnUrl[strKilnUrl.GetLength() - 1] != '/')
- strKilnUrl += '/';
- strKilnUrl += "Files/";
-
- CString strHgRoot;
- GetHgRoot(strPath, strHgRoot);
-
- // Open each file in the default web browser
- POSITION position = listFiles.GetHeadPosition();
- while (position != NULL)
- {
- CString strFile = listFiles.GetNext(position);
- CString strRelPath;
- GetRelPath(strHgRoot, strFile, strRelPath);
- ::ShellExecute(hWnd, NULL, strKilnUrl + strRelPath, NULL, NULL, SW_SHOW);
- }
- }
-}
|
|
@@ -1,21 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-bool KilnGetUrl(const CString& strPath, CString* pstrKilnUrl = NULL);
-void KilnOpenRepo(HWND hWnd, const CString& strPath);
-void KilnOpenFiles(HWND hWnd, const CString& strPath,
- const CAtlList<CString>& arrFiles);
|
|
|
@@ -1,130 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "RunDialog.h"
-#include "TortoiseUtils.h"
-#include "StringUtils.h"
-#include "THgStatus.h"
-#include "Kiln.h"
-#include "KeyboardHelpDialog.h"
-
-void RunDialog(HWND hWnd, const CString& strCmd, const CAtlList<CString>& listFiles,
- const CString& strFolder)
-{
- CString strDir = GetTHgProgRoot();
- if (strDir.IsEmpty())
- {
- ATLTRACE("RunDialog: THG root is empty\n");
- return;
- }
- CString strHgCmd = strDir + "\\thgw.exe";
-
- WIN32_FIND_DATA data;
- HANDLE hFind = ::FindFirstFile(strHgCmd, &data);
- if (hFind == INVALID_HANDLE_VALUE)
- {
- strHgCmd = strDir + "\\hgtk.exe";
- hFind = ::FindFirstFile(strHgCmd, &data);
- if (hFind == INVALID_HANDLE_VALUE)
- {
- strHgCmd = strDir + "\\thg.cmd";
- }
- else
- {
- ::FindClose(hFind);
- }
- }
- else
- {
- ::FindClose(hFind);
- }
-
- strHgCmd = Quote(strHgCmd) + " --nofork " + strCmd;
-
- CString strCwd;
- if (!strFolder.IsEmpty())
- {
- strCwd = strFolder;
- }
- else if (!listFiles.IsEmpty())
- {
- strCwd = listFiles.GetHead();
- if (!::PathIsDirectory(strCwd)) strCwd = DirName(strCwd);
- }
- else
- {
- ATLTRACE("***** RunDialog: can't get cwd\n");
- return;
- }
-
- if (strCmd == "thgstatus")
- {
- if (CTHgStatus::Remove(strCwd) != 0)
- {
- CString strPath = strDir + "\\TortoiseHgOverlayServer.exe";
- LaunchCommand(Quote(strPath), strDir);
- }
- return;
- }
- else if (strCmd == "keyboard")
- {
- CKeyboardHelpDialog dlg;
- dlg.DoModal(hWnd);
- }
- else if (strCmd == "kiln")
- {
- KilnOpenRepo(hWnd, strCwd);
- return;
- }
- else if (strCmd == "kilnfiles")
- {
- KilnOpenFiles(hWnd, strCwd, listFiles);
- return;
- }
-
- if (!listFiles.IsEmpty())
- {
- CAtlTemporaryFile file;
- if (FAILED(file.Create()))
- {
- ATLTRACE("***** RunDialog: error: failed to create temporary file\n");
- return;
- }
- ATLTRACE("RunDialog: temp file = '%s'\n", file.TempFileName());
-
- POSITION position = listFiles.GetHeadPosition();
- while (position != NULL)
- {
- CString strFile = listFiles.GetNext(position);
- ATLTRACE("RunDialog: temp file adding '%s'\n", (LPCTSTR)strFile);
- file.Write((LPCTSTR)strFile, strFile.GetLength());
- file.Write("\n", 1);
- }
- if (strCmd == "drag_move" || strCmd == "drag_copy")
- {
- // Append the current directory as the dest.
- file.Write((LPCTSTR)strCwd, strCwd.GetLength());
- file.Write("\n", 1);
- }
-
- strHgCmd += " --listfile ";
- strHgCmd += file.TempFileName();
- file.Close();
- }
-
- LaunchCommand(strHgCmd, strCwd);
-}
|
|
@@ -1,19 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-void RunDialog(HWND hWnd, const CString& strCmd, const CAtlList<CString>& listFiles,
- const CString& strFolder = "");
|
|
@@ -1,81 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-#include <initguid.h>
-#include "THgShell_h.h"
-#include "THgShell_i.c"
-
-#include "TortoiseUtils.h"
-#include "StringUtils.h"
-#include "TortoiseHgCmenu.h"
-#include "TortoiseHgDropHandler.h"
-#include "TortoiseHgOverlay.h"
-#include "TortoiseHgKeyboard.h"
-#include "TortoiseHgCopyHook.h"
-
-CComModule _Module;
-
-BEGIN_OBJECT_MAP(ObjectMap)
- OBJECT_ENTRY(CLSID_TortoiseHgCmenu, CTortoiseHgCmenu)
- OBJECT_ENTRY(CLSID_TortoiseHgDropHandler, CTortoiseHgDropHandler)
- OBJECT_ENTRY(CLSID_TortoiseHgNormal, CTortoiseHgNormal)
- OBJECT_ENTRY(CLSID_TortoiseHgAdded, CTortoiseHgAdded)
- OBJECT_ENTRY(CLSID_TortoiseHgModified, CTortoiseHgModified)
- OBJECT_ENTRY(CLSID_TortoiseHgUnversioned, CTortoiseHgUnversioned)
- OBJECT_ENTRY(CLSID_TortoiseHgKeyboard, CTortoiseHgKeyboard)
- OBJECT_ENTRY(CLSID_TortoiseHgCopyHook, CTortoiseHgCopyHook)
-END_OBJECT_MAP()
-
-BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
-{
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- ATLTRACE("DllMain: DLL_PROCESS_ATTACH\n");
- _Module.Init(ObjectMap, hInstance, &LIBID_THgShell);
- ::InitCommonControls();
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- {
- ATLTRACE("DllMain: DLL_PROCESS_ATTACH\n");
- _Module.Term();
- }
-
- return 1;
-}
-
-STDAPI DllCanUnloadNow(void)
-{
- ATLTRACE("DllCanUnloadNow\n");
- return _Module.GetLockCount() == 0 ? S_OK : S_FALSE;
-}
-
-STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
-{
- ATLTRACE("DllGetClassObject\n");
- return _Module.GetClassObject(rclsid, riid, ppv);
-}
-
-STDAPI DllRegisterServer(void)
-{
- ATLTRACE("DllRegisterServer\n");
- return _Module.RegisterServer();
-}
-
-STDAPI DllUnregisterServer(void)
-{
- ATLTRACE("DllUnregisterServer\n");
- return _Module.UnregisterServer();
-}
|
|
@@ -1,7 +0,0 @@ - ; THgShell.def: Declares the module parameters for the DLL.
-
-EXPORTS
- DllCanUnloadNow PRIVATE
- DllGetClassObject PRIVATE
- DllRegisterServer PRIVATE
- DllUnregisterServer PRIVATE
|
|
@@ -1,72 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-import "objidl.idl";
-import "shobjidl.idl";
-
-[uuid(8A566DA8-BE17-4E03-B244-3B0CCE224EA4),
- helpstring("TortoiseHg Shell Extension")]
-library THgShell
-{
- [uuid(46605027-5B8C-4DCE-BFE0-051B7972D64C)]
- coclass TortoiseHgCmenu
- {
- [default] interface IContextMenu3;
- interface IShellExtInit;
- }
-
- [uuid(CEBD95BE-B733-415F-82A8-673D9158466E)]
- coclass TortoiseHgDropHandler
- {
- [default] interface IContextMenu3;
- interface IShellExtInit;
- }
-
- [uuid(869C8877-2C3C-438D-844B-31B86BFE5E8A)]
- coclass TortoiseHgNormal
- {
- [default] interface IUnknown;
- }
-
- [uuid(AF42ADAB-8C2E-4285-B746-99B31094708E)]
- coclass TortoiseHgAdded
- {
- [default] interface IUnknown;
- }
-
- [uuid(CDA1C89D-E9B5-4981-A857-82DD932EA2FD)]
- coclass TortoiseHgModified
- {
- [default] interface IUnknown;
- }
-
- [uuid(9E3D4EC9-0624-4393-8B48-204C217ED1FF)]
- coclass TortoiseHgUnversioned
- {
- [default] interface IUnknown;
- }
-
- [uuid(36BFF16B-4EA0-4D91-9D2C-39941CF0BFE4)]
- coclass TortoiseHgKeyboard
- {
- [default] interface IObjectWithSite;
- }
-
- [uuid(61047697-7E8B-46FE-9CF8-2CE603EB3017)]
- coclass TortoiseHgCopyHook
- {
- [default] interface IUnknown;
- }
-}
|
|
|
@@ -1,112 +0,0 @@ - // Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// REGISTRY
-//
-
-IDR_CMENU REGISTRY "TortoiseHgCmenu.rgs"
-IDR_DRAGDROP REGISTRY "TortoiseHgDropHandler.rgs"
-IDR_NORMAL REGISTRY "TortoiseHgNormal.rgs"
-IDR_ADDED REGISTRY "TortoiseHgAdded.rgs"
-IDR_MODIFIED REGISTRY "TortoiseHgModified.rgs"
-IDR_UNVERSIONED REGISTRY "TortoiseHgUnversioned.rgs"
-IDR_KEYBOARD REGISTRY "TortoiseHgKeyboard.rgs"
-IDR_COPYHOOK REGISTRY "TortoiseHgCopyHook.rgs"
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""winres.h""\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "1 TYPELIB ""THgShell.tlb""\r\n"
- "\r\n"
- "#include ""THgShell.rc2""\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_KEYBOARDHELP DIALOGEX 0, 0, 243, 167
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Keyboard Help"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,97,146,50,14
- LTEXT "The following shortcut keys are available when using TortoiseHg from Windows Explorer.",IDC_TOPTEXT,7,7,229,16
- LISTBOX IDC_KEYLIST,7,34,229,101,LBS_USETABSTOPS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_KEYBOARDHELP, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 236
- TOPMARGIN, 7
- BOTTOMMARGIN, 160
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (United States) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-1 TYPELIB "THgShell.tlb"
-
-#include "THgShell.rc2"
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
|
|
@@ -1,85 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "parentid.h"
-
-#ifndef THG_VERSION_FIRST
-/* dummy version for THgShell development */
-#define THG_VERSION_FIRST 0
-#define THG_VERSION_SECOND 0
-#define THG_VERSION_THIRD 1
-#endif
-
-#ifndef THG_VERSION_SECOND
-#define THG_VERSION_SECOND 0
-#endif
-
-#ifndef THG_VERSION_THIRD
-#define THG_VERSION_THIRD 0
-#endif
-
-#ifndef THG_PRODUCT_ID
-#define THG_PRODUCT_ID ?
-#endif
-
-#define TOSTR(x) #x
-#define TOSTR2(x) TOSTR(x)
-
-#define THG_VERSION_BINARY \
- THG_VERSION_FIRST, THG_VERSION_SECOND, THG_VERSION_THIRD, 0
-
-#define THG_VERSION_STRING \
- TOSTR2(THG_VERSION_FIRST) "." \
- TOSTR2(THG_VERSION_SECOND) "." \
- TOSTR2(THG_VERSION_THIRD) "-" \
- TOSTR2(THG_PARENT_ID)
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION THG_VERSION_BINARY
- PRODUCTVERSION THG_VERSION_BINARY
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "Comments", "TortoiseHg Shell Extension"
- VALUE "CompanyName", "TortoiseHg Project"
- VALUE "FileDescription", "TortoiseHg Shell Extension"
- VALUE "FileVersion", THG_VERSION_STRING
- VALUE "InternalName", "shellext"
- VALUE "LegalCopyright", "Copyright (C) 2010 Steve Borho and others"
-#ifdef _WIN64
- VALUE "OriginalFilename", "THgShellx64.dll"
-#else
- VALUE "OriginalFilename", "THgShellx86.dll"
-#endif
- VALUE "ProductName", "TortoiseHg " TOSTR2(THG_PRODUCT_ID)
- VALUE "ProductVersion", THG_VERSION_STRING
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
|
|
@@ -1,38 +0,0 @@ - 
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "THgShell", "THgShell.vcxproj", "{156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terminate", "terminate.vcxproj", "{A50AE50A-42DF-451D-B89D-B0CCEE103ECC}"
- ProjectSection(ProjectDependencies) = postProject
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6} = {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Debug|Win32.ActiveCfg = Debug|Win32
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Debug|Win32.Build.0 = Debug|Win32
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Debug|x64.ActiveCfg = Debug|x64
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Debug|x64.Build.0 = Debug|x64
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Release|Win32.ActiveCfg = Release|Win32
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Release|Win32.Build.0 = Release|Win32
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Release|x64.ActiveCfg = Release|x64
- {156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}.Release|x64.Build.0 = Release|x64
- {A50AE50A-42DF-451D-B89D-B0CCEE103ECC}.Debug|Win32.ActiveCfg = Debug|Win32
- {A50AE50A-42DF-451D-B89D-B0CCEE103ECC}.Debug|Win32.Build.0 = Debug|Win32
- {A50AE50A-42DF-451D-B89D-B0CCEE103ECC}.Debug|x64.ActiveCfg = Debug|Win32
- {A50AE50A-42DF-451D-B89D-B0CCEE103ECC}.Release|Win32.ActiveCfg = Release|Win32
- {A50AE50A-42DF-451D-B89D-B0CCEE103ECC}.Release|Win32.Build.0 = Release|Win32
- {A50AE50A-42DF-451D-B89D-B0CCEE103ECC}.Release|x64.ActiveCfg = Release|x64
- {A50AE50A-42DF-451D-B89D-B0CCEE103ECC}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
|
|
|
@@ -1,293 +0,0 @@ - <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{156F9F3A-B46E-40E9-BA89-3B520DBFE9C6}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>THgShell</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <UseOfAtl>Static</UseOfAtl>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <UseOfAtl>Static</UseOfAtl>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <UseOfAtl>Static</UseOfAtl>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <UseOfAtl>Static</UseOfAtl>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
- <TargetName>$(ProjectName)x86</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
- <TargetName>$(ProjectName)x64</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
- <TargetName>$(ProjectName)x86</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
- <TargetName>$(ProjectName)x64</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THGSHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>$(THG_EXTRA_CPPFLAGS) %(AdditionalOptions)</AdditionalOptions>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;msi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>THgShell.def</ModuleDefinitionFile>
- </Link>
- <CustomBuildStep>
- <Command>hg parents --template "#define THG_PARENT_ID {node|short}\n" > parentid.h</Command>
- </CustomBuildStep>
- <CustomBuildStep>
- <Outputs>parentid.h;%(Outputs)</Outputs>
- </CustomBuildStep>
- <ResourceCompile>
- <AdditionalOptions>$(THG_EXTRA_RCFLAGS) %(AdditionalOptions)</AdditionalOptions>
- </ResourceCompile>
- <Midl>
- <TypeLibraryName>$(ProjectName).tlb</TypeLibraryName>
- </Midl>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THGSHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>$(THG_EXTRA_CPPFLAGS) %(AdditionalOptions)</AdditionalOptions>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;msi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>THgShell.def</ModuleDefinitionFile>
- </Link>
- <CustomBuildStep>
- <Command>hg parents --template "#define THG_PARENT_ID {node|short}\n" > parentid.h</Command>
- </CustomBuildStep>
- <CustomBuildStep>
- <Outputs>parentid.h;%(Outputs)</Outputs>
- </CustomBuildStep>
- <ResourceCompile>
- <AdditionalOptions>$(THG_EXTRA_RCFLAGS) %(AdditionalOptions)</AdditionalOptions>
- </ResourceCompile>
- <Midl>
- <TypeLibraryName>$(ProjectName).tlb</TypeLibraryName>
- </Midl>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THGSHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>$(THG_EXTRA_CPPFLAGS) %(AdditionalOptions)</AdditionalOptions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;msi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>THgShell.def</ModuleDefinitionFile>
- </Link>
- <CustomBuildStep>
- <Command>hg parents --template "#define THG_PARENT_ID {node|short}\n" > parentid.h</Command>
- </CustomBuildStep>
- <CustomBuildStep>
- <Outputs>parentid.h;%(Outputs)</Outputs>
- </CustomBuildStep>
- <ResourceCompile>
- <AdditionalOptions>$(THG_EXTRA_RCFLAGS) %(AdditionalOptions)</AdditionalOptions>
- </ResourceCompile>
- <Midl>
- <TypeLibraryName>$(ProjectName).tlb</TypeLibraryName>
- </Midl>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THGSHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>$(THG_EXTRA_CPPFLAGS) %(AdditionalOptions)</AdditionalOptions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comctl32.lib;shlwapi.lib;msi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>THgShell.def</ModuleDefinitionFile>
- </Link>
- <CustomBuildStep>
- <Command>hg parents --template "#define THG_PARENT_ID {node|short}\n" > parentid.h</Command>
- </CustomBuildStep>
- <CustomBuildStep>
- <Outputs>parentid.h;%(Outputs)</Outputs>
- <Inputs>.hgdummy</Inputs>
- </CustomBuildStep>
- <ResourceCompile>
- <AdditionalOptions>$(THG_EXTRA_RCFLAGS) %(AdditionalOptions)</AdditionalOptions>
- </ResourceCompile>
- <Midl>
- <TypeLibraryName>$(ProjectName).tlb</TypeLibraryName>
- </Midl>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Directory.cpp" />
- <ClCompile Include="DirectoryStatus.cpp" />
- <ClCompile Include="Direntry.cpp" />
- <ClCompile Include="Dirstate.cpp" />
- <ClCompile Include="DirstateCache.cpp" />
- <ClCompile Include="GlobalData.cpp" />
- <ClCompile Include="IconBitmapUtils.cpp" />
- <ClCompile Include="KeyboardHelpDialog.cpp" />
- <ClCompile Include="Kiln.cpp" />
- <ClCompile Include="QueryDirstate.cpp" />
- <ClCompile Include="RegistryConfig.cpp" />
- <ClCompile Include="RunDialog.cpp" />
- <ClCompile Include="stdafx.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="StringUtils.cpp" />
- <ClCompile Include="SysInfo.cpp" />
- <ClCompile Include="THgShell.cpp" />
- <ClCompile Include="THgStatus.cpp" />
- <ClCompile Include="THgVersion.cpp" />
- <ClCompile Include="TortoiseHgCmenu.cpp" />
- <ClCompile Include="TortoiseHgCopyHook.cpp" />
- <ClCompile Include="TortoiseHgDropHandler.cpp" />
- <ClCompile Include="TortoiseHgKeyboard.cpp" />
- <ClCompile Include="TortoiseHgOverlay.cpp" />
- <ClCompile Include="TortoiseIconBitmap.cpp" />
- <ClCompile Include="TortoiseUtils.cpp" />
- <ClCompile Include="Winstat.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="Directory.h" />
- <ClInclude Include="DirectoryStatus.h" />
- <ClInclude Include="Direntry.h" />
- <ClInclude Include="Dirstate.h" />
- <ClInclude Include="DirstateCache.h" />
- <ClInclude Include="GlobalData.h" />
- <ClInclude Include="IconBitmapUtils.h" />
- <ClInclude Include="KeyboardHelpDialog.h" />
- <ClInclude Include="Kiln.h" />
- <ClInclude Include="QueryDirstate.h" />
- <ClInclude Include="RegistryConfig.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="RunDialog.h" />
- <ClInclude Include="stdafx.h" />
- <ClInclude Include="StringUtils.h" />
- <ClInclude Include="SysInfo.h" />
- <ClInclude Include="THgStatus.h" />
- <ClInclude Include="THgVersion.h" />
- <ClInclude Include="TlsPtr.h" />
- <ClInclude Include="TortoiseHgCmenu.h" />
- <ClInclude Include="TortoiseHgCopyHook.h" />
- <ClInclude Include="TortoiseHgDropHandler.h" />
- <ClInclude Include="TortoiseHgKeyboard.h" />
- <ClInclude Include="TortoiseHgOverlay.h" />
- <ClInclude Include="TortoiseIconBitmap.h" />
- <ClInclude Include="TortoiseUtils.h" />
- <ClInclude Include="Winstat.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="THgShell.def" />
- <None Include="THgShell.rc2" />
- <None Include="TortoiseHgAdded.rgs" />
- <None Include="TortoiseHgCmenu.rgs" />
- <None Include="TortoiseHgCopyHook.rgs" />
- <None Include="TortoiseHgDropHandler.rgs" />
- <None Include="TortoiseHgKeyboard.rgs" />
- <None Include="TortoiseHgModified.rgs" />
- <None Include="TortoiseHgNormal.rgs" />
- <None Include="TortoiseHgUnversioned.rgs" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="THgShell.rc" />
- </ItemGroup>
- <ItemGroup>
- <Midl Include="THgShell.idl" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file |
|
|
@@ -1,222 +0,0 @@ - <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="Directory.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="DirectoryStatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Direntry.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Dirstate.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="DirstateCache.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="IconBitmapUtils.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="QueryDirstate.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="RegistryConfig.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="StringUtils.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="SysInfo.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="THgShell.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="THgStatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="THgVersion.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TortoiseHgCmenu.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TortoiseHgDropHandler.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TortoiseHgOverlay.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TortoiseIconBitmap.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TortoiseUtils.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Winstat.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Kiln.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TortoiseHgKeyboard.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="RunDialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="KeyboardHelpDialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="GlobalData.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TortoiseHgCopyHook.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="Directory.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="DirectoryStatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Direntry.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Dirstate.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="DirstateCache.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="IconBitmapUtils.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="QueryDirstate.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="RegistryConfig.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="stdafx.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="StringUtils.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="SysInfo.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="THgStatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="THgVersion.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TortoiseHgCmenu.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TortoiseHgDropHandler.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TortoiseHgOverlay.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TortoiseIconBitmap.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TortoiseUtils.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Winstat.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Kiln.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TortoiseHgKeyboard.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="RunDialog.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="KeyboardHelpDialog.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="GlobalData.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TlsPtr.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TortoiseHgCopyHook.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="THgShell.def">
- <Filter>Source Files</Filter>
- </None>
- <None Include="TortoiseHgAdded.rgs">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="TortoiseHgCmenu.rgs">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="TortoiseHgDropHandler.rgs">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="TortoiseHgModified.rgs">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="TortoiseHgNormal.rgs">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="TortoiseHgUnversioned.rgs">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="THgShell.rc2">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="TortoiseHgKeyboard.rgs">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="TortoiseHgCopyHook.rgs">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="THgShell.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <Midl Include="THgShell.idl">
- <Filter>Source Files</Filter>
- </Midl>
- </ItemGroup>
-</Project>
\ No newline at end of file |
|
@@ -1,60 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "THgStatus.h"
-
-CString GetPipeName()
-{
- DWORD dwSize = 260;
- char szBuf[260];
- if (!::GetUserName(szBuf, &dwSize)) return "";
- CString strRes = "\\\\.\\pipe\\TortoiseHgRpcServer-bc0c27107423-";
- strRes += szBuf;
- return strRes;
-}
-
-int CTHgStatus::SendRequest(const CString& strRequest)
-{
- static const CString strPipeName = GetPipeName();
- if (strPipeName.IsEmpty()) return 0;
-
- BOOL fSuccess;
- DWORD cbRead;
-
- ATLTRACE("CTHgStatus::SendRequest: sending '%s' to %s\n",
- (LPCTSTR)strRequest, (LPCTSTR)strPipeName);
-
- fSuccess = ::CallNamedPipe(strPipeName, (void*)(LPCTSTR)strRequest,
- strRequest.GetLength(), 0, 0, &cbRead, NMPWAIT_NOWAIT);
-
- DWORD dwErr = ::GetLastError();
- if (fSuccess || dwErr == ERROR_MORE_DATA || dwErr == ERROR_PIPE_NOT_CONNECTED)
- {
- return 0;
- }
- else if (dwErr == ERROR_PIPE_BUSY)
- {
- ATLTRACE("CTHgStatus::SendRequest: CallNamedPipe failed (ERROR_PIPE_BUSY)\n");
- return -1;
- }
- else
- {
- ATLTRACE("CTHgStatus::SendRequest: CallNamedPipe failed (%d)\n", dwErr);
- return -1;
- }
-}
|
|
@@ -1,40 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-// Copyright (C) 2009 Adrian Buehlmann
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-class CTHgStatus
-{
- static int SendRequest(const CString& strRequest);
-
-public:
- static int Update(const CString& strPath)
- {
- return SendRequest("update|" + strPath);
- }
- static int Remove(const CString& strPath)
- {
- return SendRequest("remove|" + strPath);
- }
- static int Error(const CString& strText)
- {
- return SendRequest("error|" + strText);
- }
- static int Terminate()
- {
- return SendRequest("terminate|");
- }
-};
|
|
@@ -1,26 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "stdafx.h"
-
-#include "THgVersion.h"
-#include "parentid.h"
-
-#define TOSTR(x) L ## #x
-#define TOSTR2(x) TOSTR(x)
-
-#define THG_PARENT_ID_STRING TOSTR2(THG_PARENT_ID)
-
-const CString THgVersion = THG_PARENT_ID_STRING;
|
|
@@ -1,18 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-extern const CString THgVersion;
|
|
@@ -1,55 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-template <class T>
-class CTlsPtr
-{
-private:
- DWORD m_dwTlsIndex;
-
-public:
- CTlsPtr()
- {
- m_dwTlsIndex = ::TlsAlloc();
- }
-
- ~CTlsPtr()
- {
- ::TlsFree(m_dwTlsIndex);
- }
- T* operator=(T* p)
- {
- ::TlsSetValue(m_dwTlsIndex, p);
- return p;
- }
- operator T*()
- {
- return (T*)::TlsGetValue(m_dwTlsIndex);
- }
- operator const T*() const
- {
- return (const T*)::TlsGetValue(m_dwTlsIndex);
- }
- T* operator->()
- {
- return (T*)::TlsGetValue(m_dwTlsIndex);
- }
- const T* operator->() const
- {
- return (const T*)::TlsGetValue(m_dwTlsIndex);
- }
-};
|
|
@@ -1,42 +0,0 @@ - HKCR
-{
- NoRemove 'CLSID'
- {
- ForceRemove '{AF42ADAB-8C2E-4285-B746-99B31094708E}' = s 'TortoiseHg'
- {
- 'InprocServer32' = s '%MODULE%'
- {
- val 'ThreadingModel' = s 'Apartment'
- }
- }
- }
-}
-HKLM
-{
- NoRemove 'Software'
- {
- 'TortoiseOverlays'
- {
- 'Added'
- {
- val 'TortoiseHgMsi' = s '{AF42ADAB-8C2E-4285-B746-99B31094708E}'
- }
- }
- NoRemove 'Microsoft'
- {
- NoRemove 'Windows'
- {
- NoRemove 'CurrentVersion'
- {
- NoRemove 'Shell Extensions'
- {
- NoRemove 'Approved'
- {
- val '{AF42ADAB-8C2E-4285-B746-99B31094708E}' = s 'TortoiseHg'
- }
- }
- }
- }
- }
- }
-}
|
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
|
@@ -1,36 +0,0 @@ - // Copyright (C) 2011 Fog Creek Software
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#pragma once
-
-class CTortoiseHgCopyHook :
- public CComObjectRootEx<CComMultiThreadModel>,
- public CComCoClass<CTortoiseHgCopyHook, &CLSID_TortoiseHgCopyHook>,
- public ICopyHook
-{
-public:
- CTortoiseHgCopyHook();
-
- BEGIN_COM_MAP(CTortoiseHgCopyHook)
- COM_INTERFACE_ENTRY(ICopyHook)
- END_COM_MAP()
-
- DECLARE_REGISTRY_RESOURCEID(IDR_COPYHOOK)
-
- // ICopyHook
- STDMETHOD_(UINT, CopyCallback)(HWND hWnd, UINT wFunc, UINT wFlags,
- LPCTSTR pszSrcFile, DWORD dwSrcAttribs, LPCTSTR pszDestFile,
- DWORD dwDestAttribs);
-};
|
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
|
@@ -1,35 +0,0 @@ - HKCR
-{
- NoRemove 'CLSID'
- {
- ForceRemove '{36BFF16B-4EA0-4D91-9D2C-39941CF0BFE4}' = s 'TortoiseHg'
- {
- 'InprocServer32' = s '%MODULE%'
- {
- val 'ThreadingModel' = s 'Apartment'
- }
- }
- }
-}
-HKLM
-{
- NoRemove 'Software'
- {
- NoRemove 'Microsoft'
- {
- NoRemove 'Windows'
- {
- NoRemove 'CurrentVersion'
- {
- NoRemove 'Explorer'
- {
- NoRemove 'Browser Helper Objects'
- {
- ForceRemove '{36BFF16B-4EA0-4D91-9D2C-39941CF0BFE4}' = s 'TortoiseHg'
- }
- }
- }
- }
- }
- }
-}
|
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
This file's diff was not loaded because this changeset is very large. Load changes Loading... |
Loading...