From eb7798099fe57ad0d7abfe42805353290551fd30 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Thu, 2 Apr 2009 21:51:33 +0800 Subject: [PATCH] Load Putty Key file at pull, push and clone. Signed-off-by: Frank Li --- src/Changelog.txt | 47 +++++++++++++++++++++++++++ src/TortoiseGitSetup/VersionNumberInclude.wxi | 4 +-- src/TortoiseProc/AppUtils.cpp | 27 +++++++++++++++ src/TortoiseProc/AppUtils.h | 2 ++ src/TortoiseProc/Commands/CloneCommand.cpp | 5 +++ src/TortoiseProc/Commands/FetchCommand.cpp | 6 ++++ src/TortoiseProc/Commands/PushCommand.cpp | 6 ++++ src/version.h | 12 +++---- 8 files changed, 101 insertions(+), 8 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index 59d6090..1b8bee3 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -1,3 +1,50 @@ +Version 0.5.0.0 version(internal) +Features: + *Submodule Support. + Support submodule add, sync and update. + "Submodule Sync" is located in explore context external menu, which need press "shift" key when right click. + + *Improve show log speed at big repository, such as git.git + + *OpenSSH can prompt password dialog + + *Clone, pull push support both OpenSSH and Plink. + Support both key and password mode. + Show progress when clone at git and SSH protocol. + + *Stash Save\Apply support + + *Reflog support. Need press "shift" to show reflog menu item at context menu. + + *Add save special version to another file at file list, such as log dailog. + + *Add external diff merge and undiff setting at settings page + + *Add Diff with workcopy at file list + + *Add MessageBox Tell user Revert Finished + + *Add Notepad2 to setup script to view text file + + *Add view in notepad2 at file list + + *Add Copy File list to clipboard + + *Choose Default SSH client when install TortoiseGit + + *Add user config and remote manage at setting dialog + + *Pull and push can autoload putty private key. + + +Bug Fix: + *Fixed Issue 55: "resolved" function doesn't delete temporary files. + *Fix: Issue 57: Data duplication when Clicking Check repository in Check for modification dialog + *Fix GetString error when edit at HistoryCombo + *win2k context menu fix (had an issue when shift key was pressed) + *Fix crash in logviewer on invalid time strings + + Version 0.4.2.0 version(external) *Fix Shell menu disappear because ATL library have not installed. *Fix Commit Dialog and Log Dialog default column is wrong diff --git a/src/TortoiseGitSetup/VersionNumberInclude.wxi b/src/TortoiseGitSetup/VersionNumberInclude.wxi index 297d03f..5f56913 100644 --- a/src/TortoiseGitSetup/VersionNumberInclude.wxi +++ b/src/TortoiseGitSetup/VersionNumberInclude.wxi @@ -1,7 +1,7 @@ - - + + diff --git a/src/TortoiseProc/AppUtils.cpp b/src/TortoiseProc/AppUtils.cpp index 1fc8517..c0967f5 100644 --- a/src/TortoiseProc/AppUtils.cpp +++ b/src/TortoiseProc/AppUtils.cpp @@ -614,7 +614,34 @@ bool CAppUtils::LaunchApplication(const CString& sCommandLine, UINT idErrMessage CloseHandle(process.hProcess); return true; } +bool CAppUtils::LaunchPAgent(CString *keyfile,CString * pRemote) +{ + CString key,remote; + CString cmd,out; + if( pRemote == NULL) + { + remote=_T("origin"); + } + if(keyfile == NULL) + { + cmd.Format(_T("git.exe config remote.%s.puttykeyfile"),remote); + g_Git.Run(cmd,&key,CP_ACP); + int start=0; + key.Tokenize(_T("\n"),start); + } + else + key=*keyfile; + + if(key.IsEmpty()) + return false; + CString proc=CPathUtils::GetAppDirectory(); + proc += _T("pageant.exe \""); + proc += key; + proc += _T("\""); + + return LaunchApplication(proc, IDS_ERR_EXTDIFFSTART, false); +} bool CAppUtils::LaunchRemoteSetting() { CString proc=CPathUtils::GetAppDirectory(); diff --git a/src/TortoiseProc/AppUtils.h b/src/TortoiseProc/AppUtils.h index 7b6a645..bdd1363 100644 --- a/src/TortoiseProc/AppUtils.h +++ b/src/TortoiseProc/AppUtils.h @@ -189,6 +189,8 @@ public: static bool LaunchRemoteSetting(); + static bool LaunchPAgent(CString *keyfile=NULL,CString * pRemote=NULL); + private: static CString PickDiffTool(const CTGitPath& file1, const CTGitPath& file2); static bool GetMimeType(const CTGitPath& file, CString& mimetype); diff --git a/src/TortoiseProc/Commands/CloneCommand.cpp b/src/TortoiseProc/Commands/CloneCommand.cpp index 9111e6e..029f605 100644 --- a/src/TortoiseProc/Commands/CloneCommand.cpp +++ b/src/TortoiseProc/Commands/CloneCommand.cpp @@ -26,6 +26,7 @@ #include "CloneDlg.h" #include "ProgressDlg.h" +#include "AppUtils.h" bool CloneCommand::Execute() { @@ -33,6 +34,10 @@ bool CloneCommand::Execute() dlg.m_Directory=this->orgCmdLinePath.GetWinPathString(); if(dlg.DoModal()==IDOK) { + if(dlg.m_bAutoloadPuttyKeyFile) + { + CAppUtils::LaunchPAgent(&dlg.m_strPuttyKeyFile); + } CString dir=dlg.m_Directory; CString url=dlg.m_URL; // is this a windows format UNC path, ie starts with \\ diff --git a/src/TortoiseProc/Commands/FetchCommand.cpp b/src/TortoiseProc/Commands/FetchCommand.cpp index e6bbfb9..3d0f260 100644 --- a/src/TortoiseProc/Commands/FetchCommand.cpp +++ b/src/TortoiseProc/Commands/FetchCommand.cpp @@ -25,6 +25,7 @@ #include "MessageBox.h" #include "PullFetchDlg.h" #include "ProgressDlg.h" +#include "AppUtils.h" bool FetchCommand::Execute() { @@ -33,6 +34,11 @@ bool FetchCommand::Execute() if(dlg.DoModal()==IDOK) { + if(dlg.m_bAutoLoad) + { + CAppUtils::LaunchPAgent(NULL,&dlg.m_RemoteURL); + } + CString url; url=dlg.m_RemoteURL; CString cmd; diff --git a/src/TortoiseProc/Commands/PushCommand.cpp b/src/TortoiseProc/Commands/PushCommand.cpp index 16317e9..acd7e12 100644 --- a/src/TortoiseProc/Commands/PushCommand.cpp +++ b/src/TortoiseProc/Commands/PushCommand.cpp @@ -26,6 +26,7 @@ #include "PushDlg.h" #include "ProgressDlg.h" +#include "AppUtils.h" bool PushCommand::Execute() { @@ -40,6 +41,11 @@ bool PushCommand::Execute() CString tags; CString thin; + if(dlg.m_bAutoLoad) + { + CAppUtils::LaunchPAgent(NULL,&dlg.m_URL); + } + if(dlg.m_bPack) thin=_T("--thin"); if(dlg.m_bTags) diff --git a/src/version.h b/src/version.h index 312ba87..b3f09e3 100644 --- a/src/version.h +++ b/src/version.h @@ -1,11 +1,11 @@ -#define FILEVER 0,4,2,0 -#define PRODUCTVER 0,4,2,0 -#define STRFILEVER "0, 4, 2, 0\0" -#define STRPRODUCTVER "0, 4, 2, 0\0" +#define FILEVER 0,5,0,0 +#define PRODUCTVER 0,5,0,0 +#define STRFILEVER "0, 5, 0, 0\0" +#define STRPRODUCTVER "0, 5, 0, 0\0" #define TSVN_VERMAJOR 0 -#define TSVN_VERMINOR 4 -#define TSVN_VERMICRO 2 +#define TSVN_VERMINOR 5 +#define TSVN_VERMICRO 0 #define TSVN_VERBUILD 0 #define TSVN_VERDATE "date unknown\n" -- 2.11.0