jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r1297414 - in /jackrabbit/sandbox/microkernel/src: main/java/org/apache/jackrabbit/mk/model/ main/java/org/apache/jackrabbit/mk/store/ main/java/org/apache/jackrabbit/mk/store/pm/ test/java/org/apache/jackrabbit/mk/store/
Date Tue, 06 Mar 2012 10:47:05 GMT
Author: dpfister
Date: Tue Mar  6 10:47:05 2012
New Revision: 1297414

URL: http://svn.apache.org/viewvc?rev=1297414&view=rev
Log:
Use a counter-based commit id

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/Commit.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableCommit.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/IdFactory.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/BDbPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/FSPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/H2PersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/InMemPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/MongoPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/PersistenceManager.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/store/CopyHeadRevisionTest.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/Commit.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/Commit.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/Commit.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/Commit.java
Tue Mar  6 10:47:05 2012
@@ -22,7 +22,7 @@ import org.apache.jackrabbit.mk.store.Bi
  *
  */
 public interface Commit {
-
+    
     String getRootNodeId();
 
     public String getParentId();

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableCommit.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableCommit.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableCommit.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableCommit.java
Tue Mar  6 10:47:05 2012
@@ -21,6 +21,11 @@ package org.apache.jackrabbit.mk.model;
  */
 public class MutableCommit extends AbstractCommit {
 
+    /**
+     * Commit id.
+     */
+    private String id;
+    
     public MutableCommit() {
     }
 
@@ -29,11 +34,12 @@ public class MutableCommit extends Abstr
      * 
      * @param other other commit
      */
-    public MutableCommit(Commit other) {
+    public MutableCommit(StoredCommit other) {
         setParentId(other.getParentId());
         setRootNodeId(other.getRootNodeId());
         setCommitTS(other.getCommitTS());
         setMsg(other.getMsg());
+        this.id = other.getId();
     }
 
     public void setParentId(String parentId) {
@@ -51,4 +57,13 @@ public class MutableCommit extends Abstr
     public void setMsg(String msg) {
         this.msg = msg;
     }
+    
+    /**
+     * Return the commit id.
+     * 
+     * @return commit id
+     */
+    public String getId() {
+        return id;
+    }
 }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
Tue Mar  6 10:47:05 2012
@@ -19,7 +19,6 @@ package org.apache.jackrabbit.mk.store;
 import org.apache.jackrabbit.mk.blobs.BlobStore;
 import org.apache.jackrabbit.mk.blobs.FileBlobStore;
 import org.apache.jackrabbit.mk.model.ChildNodeEntriesMap;
-import org.apache.jackrabbit.mk.model.Commit;
 import org.apache.jackrabbit.mk.model.MutableCommit;
 import org.apache.jackrabbit.mk.model.Node;
 import org.apache.jackrabbit.mk.model.MutableNode;
@@ -28,6 +27,7 @@ import org.apache.jackrabbit.mk.model.St
 import org.apache.jackrabbit.mk.store.pm.H2PersistenceManager;
 import org.apache.jackrabbit.mk.store.pm.PersistenceManager;
 import org.apache.jackrabbit.mk.util.SimpleLRUCache;
+import org.apache.jackrabbit.mk.util.StringUtils;
 
 import java.io.File;
 import java.io.InputStream;
@@ -47,6 +47,7 @@ public class DefaultRevisionStore implem
     private boolean initialized;
 
     private String headId;
+    private long headCounter;
     private final ReentrantReadWriteLock headLock = new ReentrantReadWriteLock();
     private PersistenceManager pm;
     private BlobStore blobStore;
@@ -79,12 +80,17 @@ public class DefaultRevisionStore implem
         headId = pm.readHead();
         if (headId == null || headId.length() == 0) {
             // assume virgin repository
+            byte[] rawHeadId = longToBytes(++headCounter);
+            headId = StringUtils.convertBytesToHex(rawHeadId);
+            
             String rootNodeId = pm.writeNode(new MutableNode(this));
             MutableCommit initialCommit = new MutableCommit();
             initialCommit.setCommitTS(System.currentTimeMillis());
             initialCommit.setRootNodeId(rootNodeId);
-            headId = pm.writeCommit(initialCommit);
+            pm.writeCommit(rawHeadId, initialCommit);
             pm.writeHead(headId);
+        } else {
+            headCounter = Long.parseLong(headId, 16);
         }
 
         initialized = true;
@@ -113,6 +119,22 @@ public class DefaultRevisionStore implem
         String val = System.getProperty(CACHE_SIZE);
         return (val != null) ? Integer.parseInt(val) : DEFAULT_CACHE_SIZE;
     }
+
+    /**
+     * Convert a long value into a fixed-size byte array of size 16.
+     * 
+     * @param value value
+     * @return byte array
+     */
+    static byte[] longToBytes(long value) {
+        byte[] result = new byte[16];
+        
+        for (int i = result.length - 1; i >= 0 && value != 0; i--) {
+            result[i] = (byte) (value & 0xff);
+            value >>>= 8;
+        }
+        return result;
+    }
     
     //--------------------------------------------------------< RevisionStore >
 
@@ -156,7 +178,7 @@ public class DefaultRevisionStore implem
         return id;
     }
 
-    public String putCommit(Commit commit) throws Exception {
+    public String putCommit(MutableCommit commit) throws Exception {
         verifyInitialized();
 
         PersistHook callback = null;
@@ -165,7 +187,16 @@ public class DefaultRevisionStore implem
             callback.prePersist(this);
         }
 
-        String id = pm.writeCommit(commit);
+        String id = commit.getId();
+        byte[] rawId;
+        
+        if (id == null) {
+            rawId = longToBytes(++headCounter);
+            id = StringUtils.convertBytesToHex(rawId);
+        } else {
+            rawId = StringUtils.convertHexToBytes(id);
+        }
+        pm.writeCommit(rawId, commit);
 
         if (callback != null)  {
             callback.postPersist(this);

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/IdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/IdFactory.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/IdFactory.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/IdFactory.java
Tue Mar  6 10:47:05 2012
@@ -18,10 +18,8 @@ package org.apache.jackrabbit.mk.store;
 
 import java.security.MessageDigest;
 
-import org.apache.jackrabbit.mk.util.AscendingClock;
-
 /**
- * Create new commit and internal content object ids based on serialized data.
+ * Create new internal content object ids based on serialized data.
  */
 public abstract class IdFactory {
 
@@ -41,16 +39,6 @@ public abstract class IdFactory {
     }
 
     /**
-     * Create a new id for some commit.
-     * 
-     * @param serialized serialized data
-     * @return raw revision id as byte array
-     * @throws Exception if an error occurs
-     */
-    public abstract byte[] createCommitId(byte[] serialized)
-            throws Exception;
-    
-    /**
      * Return a digest for some data.
      * 
      * @param data data
@@ -61,55 +49,12 @@ public abstract class IdFactory {
     }
     
     /**
-     * Convert a long value into a fixed-size byte array of size 16.
-     * 
-     * @param value value
-     * @return byte array
-     */
-    static byte[] longToBytes(long value) {
-        byte[] result = new byte[16];
-        
-        for (int i = result.length - 1; i >= 0 && value != 0; i--) {
-            result[i] = (byte) (value & 0xff);
-            value >>>= 8;
-        }
-        return result;
-    }
-    
-    /**
      * Return the default factory that will create node and revision ids based
      * on their content. 
      * 
      * @return factory
      */
     public static IdFactory getDigestFactory() {
-        return new IdFactory() {
-            @Override
-            public byte[] createCommitId(byte[] serialized)
-                    throws Exception {
-                
-                return digest(serialized);
-            }
-        };
-    }
-    
-    /**
-     * Return a factory that will create node ids based on their content, while
-     * returning strictly ascending revision ids based on the current system time.
-     * 
-     * @return factory
-     */
-    public static IdFactory getAscendingClockFactory() {
-        return new IdFactory() {
-
-            private final AscendingClock clock = new AscendingClock(System.currentTimeMillis());
-            
-            @Override
-            public byte[] createCommitId(byte[] serialized)
-                    throws Exception {
-                
-                return longToBytes(clock.time());
-            }
-        };
+        return new IdFactory() {};
     }
 }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java
Tue Mar  6 10:47:05 2012
@@ -17,7 +17,7 @@
 package org.apache.jackrabbit.mk.store;
 
 import org.apache.jackrabbit.mk.model.ChildNodeEntriesMap;
-import org.apache.jackrabbit.mk.model.Commit;
+import org.apache.jackrabbit.mk.model.MutableCommit;
 import org.apache.jackrabbit.mk.model.Node;
 
 import java.io.InputStream;
@@ -28,7 +28,7 @@ import java.io.InputStream;
 public interface RevisionStore extends RevisionProvider {
 
     String /*id*/ putNode(Node node) throws Exception;
-    String /*id*/ putCommit(Commit commit) throws Exception;
+    String /*id*/ putCommit(MutableCommit commit) throws Exception;
     String /*id*/ putCNEMap(ChildNodeEntriesMap map) throws Exception;
     void setHeadCommitId(String commitId) throws Exception;
     void lockHead();

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/BDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/BDbPersistenceManager.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/BDbPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/BDbPersistenceManager.java
Tue Mar  6 10:47:05 2012
@@ -151,12 +151,11 @@ public class BDbPersistenceManager imple
         }
     }
 
-    public String writeCommit(Commit commit) throws Exception {
+    public void writeCommit(byte[] rawId, Commit commit) throws Exception {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         commit.serialize(new BinaryBinding(out));
         byte[] bytes = out.toByteArray();
-        byte[] rawId = idFactory.createCommitId(bytes);
-        return persist(bytes, rawId);
+        persist(bytes, rawId);
     }
 
     public ChildNodeEntriesMap readCNEMap(String id) throws NotFoundException, Exception
{

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/FSPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/FSPersistenceManager.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/FSPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/FSPersistenceManager.java
Tue Mar  6 10:47:05 2012
@@ -112,12 +112,11 @@ public class FSPersistenceManager implem
         }
     }
 
-    public String writeCommit(Commit commit) throws Exception {
+    public void writeCommit(byte[] rawId, Commit commit) throws Exception {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         commit.serialize(new BinaryBinding(out));
         byte[] bytes = out.toByteArray();
-        byte[] rawId = idFactory.createCommitId(bytes);
-        return writeFile(bytes, rawId);
+        writeFile(bytes, rawId);
     }
 
     public ChildNodeEntriesMap readCNEMap(String id) throws NotFoundException, Exception
{

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/H2PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/H2PersistenceManager.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/H2PersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/H2PersistenceManager.java
Tue Mar  6 10:47:05 2012
@@ -178,12 +178,10 @@ public class H2PersistenceManager implem
         }
     }
     
-    public String writeCommit(Commit commit) throws Exception {
+    public void writeCommit(byte[] rawId, Commit commit) throws Exception {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         commit.serialize(new BinaryBinding(out));
         byte[] bytes = out.toByteArray();
-        byte[] rawId = idFactory.createCommitId(bytes);
-        String id = StringUtils.convertBytesToHex(rawId);
 
         Connection con = cp.getConnection();
         try {
@@ -201,7 +199,6 @@ public class H2PersistenceManager implem
         } finally {
             con.close();
         }
-        return id;
     }
 
     public ChildNodeEntriesMap readCNEMap(String id) throws NotFoundException, Exception
{

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/InMemPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/InMemPersistenceManager.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/InMemPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/InMemPersistenceManager.java
Tue Mar  6 10:47:05 2012
@@ -97,17 +97,15 @@ public class InMemPersistenceManager imp
         }
     }
 
-    public String writeCommit(Commit commit) throws Exception {
+    public void writeCommit(byte[] rawId, Commit commit) throws Exception {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         commit.serialize(new BinaryBinding(out));
         byte[] bytes = out.toByteArray();
-        String id = StringUtils.convertBytesToHex(idFactory.createCommitId(bytes));
+        String id = StringUtils.convertBytesToHex(rawId);
 
         if (!commits.containsKey(id)) {
             commits.put(id, StoredCommit.deserialize(id, new BinaryBinding(new ByteArrayInputStream(bytes))));
         }
-
-        return id;
     }
 
     public ChildNodeEntriesMap readCNEMap(String id) throws NotFoundException, Exception
{

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/MongoPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/MongoPersistenceManager.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/MongoPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/MongoPersistenceManager.java
Tue Mar  6 10:47:05 2012
@@ -186,16 +186,15 @@ public class MongoPersistenceManager imp
         }
     }
 
-    public String writeCommit(Commit commit) throws Exception {
+    public void writeCommit(byte[] rawId, Commit commit) throws Exception {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         commit.serialize(new BinaryBinding(out));
         byte[] bytes = out.toByteArray();
-        byte[] key = idFactory.createCommitId(bytes);
-        String id = StringUtils.convertBytesToHex(key);
+        String id = StringUtils.convertBytesToHex(rawId);
 
         BasicDBObject commitObject;
         if (BINARY_FORMAT) {
-            commitObject = new BasicDBObject(ID_FIELD, key).append(DATA_FIELD, bytes);
+            commitObject = new BasicDBObject(ID_FIELD, rawId).append(DATA_FIELD, bytes);
         } else {
             commitObject = new BasicDBObject(ID_FIELD, id);
             commit.serialize(new DBObjectBinding(commitObject));
@@ -205,8 +204,6 @@ public class MongoPersistenceManager imp
         } catch (MongoException.DuplicateKey ignore) {
             // fall through
         }
-
-        return id;
     }
 
     public ChildNodeEntriesMap readCNEMap(String id) throws NotFoundException, Exception
{

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/PersistenceManager.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/PersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/pm/PersistenceManager.java
Tue Mar  6 10:47:05 2012
@@ -52,5 +52,5 @@ public interface PersistenceManager {
 
     StoredCommit readCommit(String id) throws NotFoundException, Exception;
 
-    String writeCommit(Commit commit) throws Exception;
+    void writeCommit(byte[] rawId, Commit commit) throws Exception;
 }

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/store/CopyHeadRevisionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/store/CopyHeadRevisionTest.java?rev=1297414&r1=1297413&r2=1297414&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/store/CopyHeadRevisionTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/store/CopyHeadRevisionTest.java
Tue Mar  6 10:47:05 2012
@@ -25,10 +25,10 @@ import org.apache.jackrabbit.mk.fs.FileU
 import org.apache.jackrabbit.mk.json.fast.Jsop;
 import org.apache.jackrabbit.mk.json.fast.JsopArray;
 import org.apache.jackrabbit.mk.model.ChildNode;
-import org.apache.jackrabbit.mk.model.Commit;
 import org.apache.jackrabbit.mk.model.MutableCommit;
 import org.apache.jackrabbit.mk.model.MutableNode;
 import org.apache.jackrabbit.mk.model.Node;
+import org.apache.jackrabbit.mk.model.StoredCommit;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -38,12 +38,6 @@ import org.junit.Test;
  * Use-case: start off a new revision store that contains just the head revision
  * and its nodes.
  * 
- * TODO: when copying a head revision, including commit and nodes, to a new
- *       store, the revision id will be different, which might be confusing
- *       for an MK client. Cause for this is the digest computation of all
- *       fields in a commit object, including the parent commit, which is 
- *       obviously different.
- *       
  * TODO: if copying starts at some point in time and ends some time later, copy
  *       all revisions that are accessed in the meantime to the new store.
  *       This must be done in a way that ensures the integrity of the parental
@@ -78,8 +72,8 @@ public class CopyHeadRevisionTest {
 
         MicroKernelImpl mkTo = new MicroKernelImpl(new Repository(rsTo));
 
-        // TODO: assert both old and new MK have same head revision
-        // Assert.assertEquals(mkFrom.getHeadRevision(), mkTo.getHeadRevision());
+        // Assert both old and new MK have same head revision
+        Assert.assertEquals(mkFrom.getHeadRevision(), mkTo.getHeadRevision());
         
         // Assert both old and new MK have same contents
         Assert.assertEquals(
@@ -102,7 +96,7 @@ public class CopyHeadRevisionTest {
     private void copyHeadRevision(RevisionProvider from, RevisionStore to)
             throws Exception {
         
-        Commit commitFrom = from.getHeadCommit();
+        StoredCommit commitFrom = from.getHeadCommit();
         
         Node nodeFrom = from.getNode(commitFrom.getRootNodeId());
         copy(nodeFrom, to);



Mime
View raw message