You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2014/12/18 10:52:04 UTC

svn commit: r1646421 - /jackrabbit/oak/branches/1.0/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DummyRevisionContext.java

Author: chetanm
Date: Thu Dec 18 09:52:03 2014
New Revision: 1646421

URL: http://svn.apache.org/r1646421
Log:
OAK-1794 - Keep commit info for local changes in main document

AAh missed one more file from merge. Adding that

Added:
    jackrabbit/oak/branches/1.0/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DummyRevisionContext.java   (with props)

Added: jackrabbit/oak/branches/1.0/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DummyRevisionContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.0/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DummyRevisionContext.java?rev=1646421&view=auto
==============================================================================
--- jackrabbit/oak/branches/1.0/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DummyRevisionContext.java (added)
+++ jackrabbit/oak/branches/1.0/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DummyRevisionContext.java Thu Dec 18 09:52:03 2014
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.document;
+
+import java.util.Comparator;
+
+/**
+ * A revision context for tests.
+ */
+public class DummyRevisionContext implements RevisionContext {
+
+    static final RevisionContext INSTANCE = new DummyRevisionContext();
+
+    private final Comparator<Revision> comparator
+            = StableRevisionComparator.INSTANCE;
+
+    @Override
+    public UnmergedBranches getBranches() {
+        return new UnmergedBranches(comparator);
+    }
+
+    @Override
+    public UnsavedModifications getPendingModifications() {
+        return new UnsavedModifications();
+    }
+
+    @Override
+    public Comparator<Revision> getRevisionComparator() {
+        return comparator;
+    }
+
+    @Override
+    public int getClusterId() {
+        return 1;
+    }
+}

Propchange: jackrabbit/oak/branches/1.0/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DummyRevisionContext.java
------------------------------------------------------------------------------
    svn:eol-style = native