From a047e1f31d024ddb2d23a1893c8b8789de18b1b6 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 24 Apr 2018 14:22:05 +0000 Subject: [PATCH] ide: Svn conflict resolution tools improved git-svn-id: svn://ultimatepp.org/upp/trunk@11911 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/idebar.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/uppsrc/ide/idebar.cpp b/uppsrc/ide/idebar.cpp index 3a2048c81..9a270fd86 100644 --- a/uppsrc/ide/idebar.cpp +++ b/uppsrc/ide/idebar.cpp @@ -493,7 +493,9 @@ void Ide::FilePropertiesMenu(Bar& menu) String mine; String theirs; String original; - if(editfile_repo == SVN_DIR) + Vector r; + Vector rn; + if(editfile_repo == SVN_DIR) { for(FindFile ff(editfile + ".*"); ff; ff.Next()) { if(ff.IsFile()) { String p = ff.GetPath(); @@ -501,10 +503,28 @@ void Ide::FilePropertiesMenu(Bar& menu) original = p; if(p.Find(".merge-right.r") >= 0) theirs = p; - if(p.Find(".working") >= 0) + if(p.Find(".working") >= 0 || p.Find(".mine") >= 0) mine = p; + try { + CParser q(GetFileExt(~p)); + q.PassChar('.'); + q.PassChar('r'); + int n = q.ReadInt(); + if(q.IsEof()) { + r.Add(p); + rn.Add(n); + } + } + catch(CParser::Error) {} } } + if(IsNull(original) && IsNull(theirs) && r.GetCount() == 2) { + original = r[0]; + theirs = r[1]; + if(rn[1] > rn[0]) + Swap(original, theirs); + } + } else { bool a = false, b = false, c = false; int n = min(editor.GetLineCount(), 10000);