diff --git a/uppsrc/CtrlLib/ColumnList.ast b/uppsrc/CtrlLib/ColumnList.ast deleted file mode 100644 index 32ed9210a..000000000 Binary files a/uppsrc/CtrlLib/ColumnList.ast and /dev/null differ diff --git a/uppsrc/PostgreSQL/PostgreSQLSchema.h b/uppsrc/PostgreSQL/PostgreSQLSchema.h index 900a0a41c..7b6ce531b 100644 --- a/uppsrc/PostgreSQL/PostgreSQLSchema.h +++ b/uppsrc/PostgreSQL/PostgreSQLSchema.h @@ -147,75 +147,72 @@ ATTRIBUTE("alter table @t add constraint UQ_@t$" #name " unique (" list ");", \ #undef INT_ARRAY #undef INT_ #undef INT_ARRAY_ - #undef INT64 #undef INT64_ARRAY #undef INT64_ #undef INT64_ARRAY_ - #undef SERIAL #undef SERIAL_ARRAY #undef SERIAL_ #undef SERIAL_ARRAY_ - +#undef ISERIAL +#undef ISERIAL_ARRAY +#undef ISERIAL_ +#undef ISERIAL_ARRAY_ #undef BIGSERIAL #undef BIGSERIAL_ARRAY #undef BIGSERIAL_ #undef BIGSERIAL_ARRAY_ - #undef DOUBLE #undef DOUBLE_ARRAY #undef DOUBLE_ #undef DOUBLE_ARRAY_ - #undef STRING #undef STRING_ARRAY #undef STRING_ #undef STRING_ARRAY_ - #undef DATE #undef DATE_ARRAY #undef DATE_ #undef DATE_ARRAY_ - #undef TIME #undef TIME_ARRAY #undef TIME_ #undef TIME_ARRAY_ - #undef TIME_SEC #undef TIME_SEC_ARRAY #undef TIME_SEC_ #undef TIME_SEC_ARRAY_ - #undef BOOL #undef BOOL_ARRAY #undef BOOL_ #undef BOOL_ARRAY_ - #undef LONG #undef LONG_ - #undef LONGRAW #undef LONGRAW_ - +#undef BLOB +#undef BLOB_ +#undef CLOB +#undef CLOB_ #undef SEQUENCE - +#undef SEQUENCE_ #undef PRIMARY_KEY #undef NOT_NULL -#undef INDEX -#undef PARTIAL_INDEX #undef UNIQUE #undef SQLDEFAULT +#undef INDEX +#undef PARTIAL_INDEX +#undef PARTIAL_INDEX_ #undef REFERENCES -#undef REFERENCES_ #undef REFERENCES_CASCADE +#undef REFERENCES_ #undef REFERENCES_CASCADE_ #undef DUAL_PRIMARY_KEY #undef DUAL_UNIQUE -#undef UNIQUE_LIST #undef SQLCHECK -#undef INDEX_LIST -#undef PARTIAL_INDEX_LIST #undef PRIMARY_KEY_LIST #undef REFERENCES_LIST +#undef INDEX_LIST +#undef PARTIAL_INDEX_LIST +#undef UNIQUE_LIST diff --git a/uppsrc/Sql/sch_model.h b/uppsrc/Sql/sch_model.h index 3d4b23998..8041c4149 100644 --- a/uppsrc/Sql/sch_model.h +++ b/uppsrc/Sql/sch_model.h @@ -202,3 +202,4 @@ #undef SCHEMA #undef CONFIG #undef UPGRADE +#undef TIMESTAMP diff --git a/uppsrc/ide/RepoSync.cpp b/uppsrc/ide/RepoSync.cpp index 69476feb0..2ec05b6b6 100644 --- a/uppsrc/ide/RepoSync.cpp +++ b/uppsrc/ide/RepoSync.cpp @@ -1,5 +1,10 @@ #include "ide.h" +String RepoCfgFile(const String& path) +{ + return ConfigFile("cfg/repo-" + SHA1String(path)); +} + String GetGitUrl(const String& repo_dir) { Vector ln = Split(GitCmd(repo_dir, "config --get remote.origin.url"), CharFilterCrLf); @@ -80,6 +85,33 @@ RepoSync::RepoSync() }; } +RepoSync::~RepoSync() +{ + int repoi = 0; + for(int i = 0; i < list.GetCount(); i++) { + SvnOptions *svn = dynamic_cast(list.GetCtrl(i, 0)); + GitOptions *git = dynamic_cast(list.GetCtrl(i, 0)); + if(svn || git) { + String s; + if(svn) { + if(svn->commit) + s << "commit;"; + if(svn->update) + s << "update;"; + } + if(git) { + if(git->pull) + s << "pull;"; + if(git->commit) + s << "commit;"; + if(git->push) + s << "push;"; + } + SaveChangedFile(RepoCfgFile(work.GetKey(repoi++)), s); + } + } +} + int CharFilterSvnMsgRepo(int c) { return c >= 32 && c < 128 && c != '\"' ? c : 0; @@ -228,10 +260,10 @@ void RepoSync::SyncCommits() bool commit = true; for(int i = 0; i < list.GetCount(); i++) { if(SvnOptions *o = dynamic_cast(list.GetCtrl(i, 0))) - commit = o->commit; + commit = o->commit.IsEnabled() && o->commit; else if(GitOptions *o = dynamic_cast(list.GetCtrl(i, 0))) - commit = o->commit; + commit = o->commit.IsEnabled() && o->commit; else { for(int j = 0; j < 2; j++) { Ctrl *ctrl = list.GetCtrl(i, j); @@ -249,6 +281,12 @@ void RepoSync::SyncList() svndir.Clear(); for(const auto& w : ~work) { String path = GetFullPath(w.key); + String cfg = LoadFile(RepoCfgFile(path)); + auto Default = [&](const char *s) { + if(cfg.IsVoid()) + return true; + return cfg.Find(s) >= 0; + }; int hi = list.GetCount(); Color bk = AdjustIfDark(LtYellow()); list.Add(REPOSITORY, path, @@ -260,12 +298,11 @@ void RepoSync::SyncList() if(w.value == SVN_DIR) { auto& o = list.CreateCtrl(hi, 0, false); o.SizePos(); - o.commit = true; + o.commit = Default("commit"); o.commit << [=] { SyncCommits(); }; - o.update = true; + o.update = Default("update"); actions = ListSvn(path); if(!actions) { - o.commit = false; o.commit.Disable(); } credentials.Show(); @@ -274,13 +311,12 @@ void RepoSync::SyncList() if(w.value == GIT_DIR) { auto& o = list.CreateCtrl(hi, 0, false); o.SizePos(); - o.commit = true; + o.commit = Default("commit"); o.commit << [=] { SyncCommits(); }; - o.push = true; - o.pull = true; + o.push = Default("push"); + o.pull = Default("pull"); actions = ListGit(path); if(!actions) { - o.commit = false; o.push = false; o.commit.Disable(); } @@ -428,6 +464,8 @@ again: int action = list.Get(l, 0); if(action == REPOSITORY) break; + if(action == MESSAGE) + msgmap.GetAdd(repo_dir) = list.Get(l, 3); l++; } continue; @@ -439,7 +477,7 @@ again: break; String path = list.Get(l, 1); bool revert = list.Get(l, 2) == 1; - if(svn && svn->commit) { + if(svn && svn->commit.IsEnabled() && svn->commit) { if(action == MESSAGE && commit) { String msg = list.Get(l, 3); if(sys.CheckSystem(SvnCmd(sys, "commit", repo_dir) << filelist << " -m \"" << msg << "\"")) @@ -451,7 +489,7 @@ again: if(SvnFile(sys, filelist, action, path, revert)) commit = true; } - if(git && git->commit) { + if(git && git->commit.IsEnabled() && git->commit) { if(action == MESSAGE && commit) { String msg = list.Get(l, 3); if(sys.Git(repo_dir, "commit -a -m \"" << msg << "\"")) diff --git a/uppsrc/ide/SelectPkg.cpp b/uppsrc/ide/SelectPkg.cpp index 8fa3fefe9..14f7a82c0 100644 --- a/uppsrc/ide/SelectPkg.cpp +++ b/uppsrc/ide/SelectPkg.cpp @@ -593,7 +593,7 @@ void SelectPackageDlg::SyncList(const String& find) d.ispackage && (!(fk == MAIN) || d.main) && (!(fk == NONMAIN) || !d.main) && - ToUpper(d.package + d.description + d.nest).Find(s) >= 0 && + ToUpper(d.package + d.description).Find(s) >= 0 && added.Find(d.package) < 0) { packages.Add() = d; if(!d.main) diff --git a/uppsrc/ide/idebar.cpp b/uppsrc/ide/idebar.cpp index 23827a518..30632157d 100644 --- a/uppsrc/ide/idebar.cpp +++ b/uppsrc/ide/idebar.cpp @@ -581,7 +581,7 @@ void Ide::FilePropertiesMenu(Bar& menu) } if(mine.GetCount() || theirs.GetCount() || original.GetCount()) { - menu.Sub("SVN Conflict", [=] (Bar& bar) { + menu.Sub(editfile_repo == GIT_DIR ? "GIT Conflict" : "SVN Conflict", [=] (Bar& bar) { if(mine.GetCount() && theirs.GetCount()) bar.Add("Compare mine <-> theirs", [=] { DiffFiles("mine", mine, "theirs", theirs); }); if(mine.GetCount() && original.GetCount()) @@ -610,8 +610,6 @@ void Ide::FilePropertiesMenu(Bar& menu) }); } } - if(editfile.GetCount() && editfile_repo == GIT_DIR) { - } } } diff --git a/uppsrc/ide/urepo.h b/uppsrc/ide/urepo.h index 8726c98c5..bfa6ad76a 100644 --- a/uppsrc/ide/urepo.h +++ b/uppsrc/ide/urepo.h @@ -84,6 +84,7 @@ public: void DoSync(); RepoSync(); + ~RepoSync(); };