thg.exe or thgw.exe?

292 views
Skip to first unread message

Adrian Buehlmann

unread,
Mar 4, 2011, 6:58:37 PM3/4/11
to thg...@googlegroups.com
Is there a specific reason why we don't do:

diff --git a/win32/shellext/CShellExtCMenu.cpp
b/win32/shellext/CShellExtCMenu.cpp
--- a/win32/shellext/CShellExtCMenu.cpp
+++ b/win32/shellext/CShellExtCMenu.cpp
@@ -793,7 +793,7 @@ void CShellExtCMenu::RunDialog(const std
TDEBUG_TRACE("RunDialog: THG root is empty");
return;
}
- std::string hgcmd = dir + "\\thg.exe";
+ std::string hgcmd = dir + "\\thgw.exe";

WIN32_FIND_DATAA data;
HANDLE hfind = FindFirstFileA(hgcmd.c_str(), &data);

?

http://tortoisehg.bitbucket.org/manual/2.0/intro.html says

"On Windows, TortoiseHg includes both thg.exe and thgw.exe. The latter
is intended to be launched from desktop shortcuts or menu entries as it
will refuse to open a command console. thg.exe is for use on the
console, and can provide command line help. The thg.cmd batch file that
our installer adds into your PATH runs thg.exe."

Steve Borho

unread,
Mar 5, 2011, 12:36:49 AM3/5/11
to thg...@googlegroups.com, Adrian Buehlmann
On Fri, Mar 4, 2011 at 5:58 PM, Adrian Buehlmann <adr...@cadifra.com> wrote:
> Is there a specific reason why we don't do:
>
> diff --git a/win32/shellext/CShellExtCMenu.cpp
> b/win32/shellext/CShellExtCMenu.cpp
> --- a/win32/shellext/CShellExtCMenu.cpp
> +++ b/win32/shellext/CShellExtCMenu.cpp
> @@ -793,7 +793,7 @@ void CShellExtCMenu::RunDialog(const std
>         TDEBUG_TRACE("RunDialog: THG root is empty");
>         return;
>     }
> -    std::string hgcmd = dir + "\\thg.exe";
> +    std::string hgcmd = dir + "\\thgw.exe";
>
>     WIN32_FIND_DATAA data;
>     HANDLE hfind = FindFirstFileA(hgcmd.c_str(), &data);
>
> ?
>
> http://tortoisehg.bitbucket.org/manual/2.0/intro.html says
>
> "On Windows, TortoiseHg includes both thg.exe and thgw.exe. The latter
> is intended to be launched from desktop shortcuts or menu entries as it

I think I meant start menu entries here, but there really isn't any
compelling reason not to use thgw.exe from the shell extension.

> will refuse to open a command console. thg.exe is for use on the
> console, and can provide command line help. The thg.cmd batch file that
> our installer adds into your PATH runs thg.exe."
>

--
Steve Borho

Reply all
Reply to author
Forward
0 new messages