Mercurial > hg > Members > shoshi > TreeCMS > TreeCMSPrototype1
changeset 29:174bc0d21712
modified SimpleEditor.merge .commit
author | ShoshiTAMAKI |
---|---|
date | Tue, 09 Nov 2010 18:13:54 +0900 |
parents | 64359341c04a |
children | 8d733b98c5de |
files | src/treecms/proto/simple/SimpleEditor.java |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/treecms/proto/simple/SimpleEditor.java Mon Nov 08 17:34:44 2010 +0900 +++ b/src/treecms/proto/simple/SimpleEditor.java Tue Nov 09 18:13:54 2010 +0900 @@ -28,11 +28,21 @@ public boolean commit(boolean _force) { - m_contents.set(m_tip); + if(_force){ + m_contents.set(m_tip); + update(); + return true; + } + return m_contents.compareAndSet(m_modified,m_tip); + } + + public void merge() + { + LinkedList<Node> log = new LinkedList<Node>(m_log); update(); - return true; - - // need to merge. + for(Node node : log){ + edit(node); + } } public void discard()