Mercurial > hg > RemoteEditor > REPSessionManager
changeset 494:6b718b6b789c
new merge fix
author | one |
---|---|
date | Sat, 23 Oct 2010 19:32:16 +0900 |
parents | 24297c2d9422 |
children | bd76f7e39247 |
files | rep/handler/Editor.java |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/handler/Editor.java Sat Oct 23 18:54:15 2010 +0900 +++ b/rep/handler/Editor.java Sat Oct 23 19:32:16 2010 +0900 @@ -420,7 +420,7 @@ * mode==false Don't truncate unMergedCmds after merge mark */ private void truncateSentList(REPCommand commit, boolean mode) { - if (merging) return; + if (blocking) return; // merging is not enough LinkedList<REPCommand>s = new LinkedList<REPCommand>(); for(REPCommand command:sentList) { if (command.eid!=eid) { @@ -662,9 +662,14 @@ } } output.addLast(mergeMark); + LinkedList<REPCommand> ns = new LinkedList<REPCommand>(); output.addAll(sortedEditCmds); + ns.addAll(sortedEditCmds); + ns.addLast(mergeMark); output.addAll(newSentList); - logger.writeLog("sortedMerge"+eid+":"+sentList); + ns.addAll(newSentList); + sentList = ns; + logger.writeLog("sortedMerge"+eid+":"+sortedEditCmds+newSentList); // unMerged command のdeleteのundo string は、この時点で使えない。 // Editor 側から送り返して来たものを使う必要がある。 logger.writeLog("outputMerge"+eid+":"+output);