jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r967003 - /jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
Date Fri, 23 Jul 2010 08:35:30 GMT
Author: dpfister
Date: Fri Jul 23 08:35:30 2010
New Revision: 967003

URL: http://svn.apache.org/viewvc?rev=967003&view=rev
Log:
Include revision number in output

Modified:
    jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java

Modified: jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java?rev=967003&r1=967002&r2=967003&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
(original)
+++ jackrabbit/sandbox/jackrabbit-journalwalker/src/main/java/org/apache/jackrabbit/journalwalker/JournalWalker.java
Fri Jul 23 08:35:30 2010
@@ -182,7 +182,8 @@ public class JournalWalker implements Re
      * @param workspace workspace name
      * @param id item id
      */
-    public void log(String date, char op, String userId, String workspace, ItemId id) {
+    public void log(String date, char op, String userId, String workspace, ItemId id,
+                    long revision) {
         StringBuffer buf = new StringBuffer();
         if (date != null) {
             buf.append(date);
@@ -190,7 +191,11 @@ public class JournalWalker implements Re
         }
         buf.append('[');
         buf.append(op);
-        buf.append("] [");
+        buf.append("] ");
+
+        buf.append(revision);
+        buf.append(' ');
+
         if (userId != null) {
             buf.append(userId);
             buf.append('@');
@@ -275,26 +280,28 @@ public class JournalWalker implements Re
         }
 
         ChangeLog changes = record.getChanges();
+        long revision = record.getRevision();
+
         for (ItemState state : changes.deletedStates()) {
             ItemId id = state.getId();
             if (id instanceof PropertyId && !showProperties) {
                 continue;
             }
-            log(date, 'D', userId, record.getWorkspace(), state.getId());
+            log(date, 'D', userId, record.getWorkspace(), state.getId(), revision);
         }
         for (ItemState state : changes.modifiedStates()) {
             ItemId id = state.getId();
             if (id instanceof PropertyId && !showProperties) {
                 continue;
             }
-            log(date, 'U', userId, record.getWorkspace(), state.getId());
+            log(date, 'U', userId, record.getWorkspace(), state.getId(), revision);
         }
         for (ItemState state : changes.addedStates()) {
             ItemId id = state.getId();
             if (id instanceof PropertyId && !showProperties) {
                 continue;
             }
-            log(date, 'A', userId, record.getWorkspace(), state.getId());
+            log(date, 'A', userId, record.getWorkspace(), state.getId(), revision);
         }
     }
 
@@ -304,7 +311,7 @@ public class JournalWalker implements Re
     public void process(LockRecord record) {
         if (showAll) {
             log(null, record.isLock() ? 'L' : 'l', record.getOwner(),
-                    record.getWorkspace(), record.getNodeId());
+                    record.getWorkspace(), record.getNodeId(), record.getRevision());
         }
     }
 



Mime
View raw message