Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
#include "stdafx.h"#include "ShellExt.h"#include "TortoiseUtils.h"#include "StringUtils.h"#include "PipeUtils.h"#include "dirstate.h"#include <shlwapi.h>STDMETHODIMPCShellExt::GetOverlayInfo(LPWSTRpwszIconFile,intcchMax,int*pIndex,DWORD*pdwFlags){*pIndex=0;*pdwFlags=ISIOI_ICONFILE;// get installation pathstd::stringdir=GetTHgProgRoot();if(dir.empty()){TDEBUG_TRACE("GetOverlayInfo: THG root is empty");wcsncpy(pwszIconFile,L"",cchMax);returnS_OK;}// find icon per overlay typestd::wstringdirWide=MultibyteToWide(dir);wcsncpy(pwszIconFile,dirWide.c_str(),cchMax);cchMax-=static_cast<int>(dirWide.size())+1;/* switch (myTortoiseClass) { case TORTOISE_OLE_ADDED: wcsncat(pwszIconFile, L"\\icons\\status\\added.ico", cchMax); break; case TORTOISE_OLE_MODIFIED: wcsncat(pwszIconFile, L"\\icons\\status\\changed.ico", cchMax); break; case TORTOISE_OLE_UNCHANGED: wcsncat(pwszIconFile, L"\\icons\\status\\unchanged.ico", cchMax); break; default: break; }*/std::stringpath=WideToMultibyte(pwszIconFile);TDEBUG_TRACE("GetOverlayInfo: icon path = "<<path);returnS_OK;}STDMETHODIMPCShellExt::GetPriority(int*pPriority){*pPriority=1;returnS_OK;}STDMETHODIMPCShellExt::IsMemberOf(LPCWSTRpwszPath,DWORD/* dwAttrib */){std::stringmbstr=WideToMultibyte(pwszPath);TDEBUG_TRACE("IsMemberOf: search for "<<mbstr.c_str());charpath[MAX_PATH]="";strncat(path,mbstr.c_str(),MAX_PATH);std::stringhgroot=GetHgRepoRoot(path);if(hgroot.empty()){TDEBUG_TRACE("IsMemberOf: Not a Hg repo (hgroot is empty)");returnS_FALSE;} TDEBUG_TRACE("IsMemberOf: hgroot = " << hgroot);
- if (PathIsDirectory(path))- return S_FALSE;- size_t offset = hgroot.length();
if (path[offset] == '\\')
offset++;
constchar*relpathptr=path+offset;charrelpath[MAX_PATH]="";strncat(relpath,relpathptr,MAX_PATH); char status = 0;
- if (!HgQueryDirstateFile(hgroot.c_str(), path, relpath, &status))
+ if (PathIsDirectory(path))
{
- TDEBUG_TRACE("IsMemberOf: HgQueryDirstateFile returns false");
- return S_FALSE;
+ if (!strlen(relpath))+ return S_FALSE; // don't show icon on repo root dir++ if (strncmp(relpath, ".hg", 3) == 0)+ return S_FALSE; // don't descend into .hg dir++ if (!HgQueryDirstateDirectory(hgroot.c_str(), path, relpath, &status))+ {+ TDEBUG_TRACE("IsMemberOf: HgQueryDirstateDirectory returns false");+ return S_FALSE;+ }+ }+ else + {+ if (!HgQueryDirstateFile(hgroot.c_str(), path, relpath, &status))+ {+ TDEBUG_TRACE("IsMemberOf: HgQueryDirstateFile returns false");
+return S_FALSE;
+ } }
TDEBUG_TRACE("IsMemberOf: status = " << status);
if(myTortoiseClass==TORTOISE_OLE_ADDED&&status=='A')returnS_OK;elseif(myTortoiseClass==TORTOISE_OLE_MODIFIED&&status=='M')returnS_OK;elseif(myTortoiseClass==TORTOISE_OLE_UNCHANGED&&status=='C')returnS_OK;returnS_FALSE;}
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.