Hi team:
i write a command with name rbt.bat which uses
rbtools to put patch file to reviewboard
in this command, i should know the base directory of patch file, but it's difficult , i only know the work directory of TortoiseProc.exe
so i rebuild TortoiseProc.exe with below code, could the Team add an option to config this ?
bool CreatePatchCommand::Execute()
{
bool bRet = false;
auto savepath = CPathUtils::GetLongPathname(parser.GetVal(L"savepath"));
CCreatePatch dlg;
dlg.m_pathList = pathList;
if (parser.HasKey(L"noui")||(dlg.DoModal()==IDOK))
{
if (cmdLinePath.IsEmpty())
{
cmdLinePath = pathList.GetCommonRoot();
}
if (parser.HasKey(L"showoptions"))
{
CDiffOptionsDlg optionsdlg(CWnd::FromHandle(GetExplorerHWND()));
optionsdlg.SetDiffOptions(dlg.m_diffOptions);
if (optionsdlg.DoModal() == IDOK)
dlg.m_diffOptions = optionsdlg.GetDiffOptions();
else
return false;
}
if (/*configed*/)
{
bRet = CreatePatch(CTSVNPath(sOrigCWD), dlg.m_pathList, dlg.m_bPrettyPrint, dlg.m_diffOptions, CTSVNPath(savepath.c_str()));
}
else /*default*/
{
bRet = CreatePatch(pathList.GetCommonRoot(), dlg.m_pathList, dlg.m_bPrettyPrint, dlg.m_diffOptions, CTSVNPath(savepath.c_str()));
}
SVN svn;
svn.Revert(dlg.m_filesToRevert, CStringArray(), false, false, false);
}
return bRet;
}