ide: Dir diff can now limit files by time, report history of .upp file, fixed SSL issue

git-svn-id: svn://ultimatepp.org/upp/trunk@15773 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2021-02-16 12:39:19 +00:00
parent b9f4c69972
commit 42ba8e7854
8 changed files with 30 additions and 17 deletions

View file

@ -1,6 +1,6 @@
description "OpenSSL based SSL support for Core\3770,128,128";
library(POSIX !OSX) "crypto ssl";
library(!OSX) "crypto ssl";
library(WIN32) gdi32;

View file

@ -232,7 +232,7 @@ oid]_[* CoFor`_ST]([@(0.0.255) int]_[*@3 n], [*@4 Fn]_[*@3 iterator])&]
[s2;%% Calls CoFor([%-*@3 n], [%-*@3 iterator]) if [%-*@3 co] is true,
CoFor`_ST([%-*@3 n], [%-*@3 iterator]) otherwise. This allows to
parametrize algorithms with respect to parallelization.&]
[s0; &]
[s3; &]
[ {{10000@(113.42.0) [s0;%% [*@7;4 CoWorkerResources]]}}&]
[s3; &]
[s1;:noref: [@(0.0.255)3 template][3 _<][@(0.0.255)3 class][3 _][*@4;3 T][3 >]&]

View file

@ -16,6 +16,14 @@ DirDiffDlg::DirDiffDlg()
modified.SetLabel(t_("Modified"));
removed.SetColor(Red()).SetLabel(t_("Removed"));
recent <<= Null;
recent.Add(Null, "All");
recent.Add(1, "1 Day");
recent.Add(3, "3 Days");
recent.Add(7, "7 Days");
recent.Add(14, "14 Days");
recent.Add(32, "28 Days");
compare.SetLabel(t_("Compare"));
int bcy = max(cy, compare.GetStdSize().cy);
@ -27,6 +35,7 @@ DirDiffDlg::DirDiffDlg()
files_pane.Add( added.TopPos(3 * cy + 3 * div, bcy).LeftPosZ(2, 60));
files_pane.Add(modified.TopPos(3 * cy + 3 * div, bcy).LeftPosZ(52, 70));
files_pane.Add( removed.TopPos(3 * cy + 3 * div, bcy).LeftPosZ(128, 80));
files_pane.Add( recent.TopPos(3 * cy + 3 * div, bcy).RightPos(0, bcx));
removed = 1;
added = 1;
@ -36,7 +45,6 @@ DirDiffDlg::DirDiffDlg()
clearFind.RightPosZ(1, 16).VSizePosZ(1, 1);
find.AddChild(&clearFind);
files_pane.Add(info.SetAlign(ALIGN_RIGHT).TopPos(3 * cy + 3 * div, bcy).RightPos(1, Zx(70)));
files_pane.Add(compare.TopPos(2 * cy + 2 * div, bcy).RightPos(0, bcx));
files_pane.Add(files.VSizePos(3 * cy + bcy + 4 * div, Zy(24)).HSizePos());
files_pane.Add(find.BottomPosZ(4, 19).HSizePosZ());
@ -193,6 +201,8 @@ void DirDiffDlg::Compare()
Sort(f);
Progress pi(t_("Comparing.."));
pi.SetTotal(f.GetCount());
Date dlim = IsNull(recent) ? Null : GetSysDate() - (int)~recent;
list.Clear();
for(int i = 0; i < f.GetCount(); i++) {
@ -201,7 +211,7 @@ void DirDiffDlg::Compare()
String p1 = AppendFileName(~dir1, f[i]);
String p2 = AppendFileName(~dir2, f[i]);
int n = NORMAL_FILE;
if(!FileEqual(p1, p2, n))
if((IsNull(dlim) || FileGetTime(p1) >= dlim || FileGetTime(p2) >= dlim) && !FileEqual(p1, p2, n))
list.Add(MakeTuple(f[i], p1, p2, n));
}
@ -245,7 +255,7 @@ void DirDiffDlg::ShowResult()
&& ToLower(list[i].a).Find(sFind) >= 0)
files.Add(MakeFile(i));
}
info = AsString(files.GetCount()) + " files";
Title(AsString(files.GetCount()) + " files");
clearFind.Show(!IsNull(find));
}

View file

@ -12,6 +12,8 @@ PatchDiff::PatchDiff()
removeright.Remove();
revertright.Remove();
recent.Hide();
left.Height(EditField::GetStdHeight());
left.Add(lfile.HSizePosZ(0, 148));
left.Add(removeleft.VSizePos().RightPosZ(0, 70));

View file

@ -247,6 +247,7 @@ protected:
Splitter files_diff;
ParentCtrl files_pane;
FileList files;
DropList recent;
SelectDirButton seldir1;
WithDropChoice<EditString> dir1;
@ -255,7 +256,6 @@ protected:
Option hidden;
Option split_lines;
Button compare;
Label info;
Option removed, added, modified;
EditString find;

View file

@ -765,10 +765,3 @@ void Ide::DiffFiles(const char *lname, const String& l, const char *rname, const
diff.Set(lname, LoadConflictFile(l), rname, LoadConflictFile(r));
diff.Execute();
}
void Ide::SvnHistory()
{
if(IsNull(editfile))
return;
RunRepoDiff(editfile);
}

View file

@ -821,7 +821,6 @@ public:
String LoadConflictFile(const String& n);
void GotoDiffLeft(int line, DiffDlg *df);
void GotoDiffRight(int line, FileDiff *df);
void SvnHistory();
void Edit(Bar& menu);
bool IsDesignerFile(const String& path);

View file

@ -472,6 +472,13 @@ void Ide::Project(Bar& menu)
if(!IsEditorMode()) {
menu.MenuSeparator();
if(repo_dirs) {
String pp = GetActivePackagePath();
menu.AddMenu(FileExists(pp) && editfile_repo,
(editfile_repo == SVN_DIR ? "Show svn history of " : "Show git history of ") + GetFileName(pp),
IdeImg::SvnDiff(), [=] {
if(FileExists(pp))
RunRepoDiff(pp);
});
if(menu.IsMenuBar())
menu.Add("Repo", THISBACK(ProjectRepo));
else
@ -505,9 +512,11 @@ void Ide::FilePropertiesMenu(Bar& menu)
AK_DIFFLOG, IdeImg::DiffLog(), [=] { DiffWith(GetTargetLogPath()); })
.Help("Show differences between the current and the log");
if(editfile_repo) {
String txt = String("Show ") + (editfile_repo == SVN_DIR ? "svn" : "git") + " history of file";
menu.AddMenu(candiff, AK_SVNDIFF, IdeImg::SvnDiff(), THISBACK(SvnHistory))
.Text(txt + "..").Help(txt);
String txt = String("Show ") + (editfile_repo == SVN_DIR ? "svn" : "git") + " history of ";
menu.AddMenu(candiff, AK_SVNDIFF, IdeImg::SvnDiff(), [=] {
if(!IsNull(editfile))
RunRepoDiff(editfile);
}).Text(txt + "file..");
if(editfile.GetCount()) {
String mine;
String theirs;