jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject commit hook support (OAK-100)
Date Wed, 23 May 2012 11:49:42 GMT

Hi,

In revision 1341834 I added initial support for commit hooks. That is, 
the methods of CommitHook are now called when transient changes are 
applied.

However I currently don't do a rebase before merging the changes back to 
trunk. Is there a reason we should do that? If so, shouldn't it better 
go into an upper layer (i.e. Root/Tree)? A rebase operation already 
exists there and is used by Session.refresh(true).

Probably something like this could be done:

===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java 
(revision 1341791)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java 
(revision )
@@ -158,6 +158,7 @@

      @Override
      public void commit() throws CommitFailedException {
+        rebase();
          purgePendingChanges();
          branch.merge();
          branch = store.branch();

Michael

Mime
View raw message