diff options
author | James Moger <james.moger@gitblit.com> | 2013-05-31 20:08:50 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-05-31 20:08:50 -0400 |
commit | 9b26b74d198aa4efbe4b25f6667b98eb5261e13d (patch) | |
tree | f6078f62229b5bb42964da39d29de07998351b9a /src/main/java/com/gitblit/models/DailyLogEntry.java | |
parent | b5a318c0e6340dc546323ea2ccd3861e55beff62 (diff) | |
download | gitblit-9b26b74d198aa4efbe4b25f6667b98eb5261e13d.tar.gz gitblit-9b26b74d198aa4efbe4b25f6667b98eb5261e13d.zip |
Refinements to push log display and daily digests
* Properly support timezone-based date groupings
* Polish css for the major browsers on Win & Linux
* Use Gitblit constants for refs instead of JGit constants
Diffstat (limited to 'src/main/java/com/gitblit/models/DailyLogEntry.java')
-rw-r--r-- | src/main/java/com/gitblit/models/DailyLogEntry.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/models/DailyLogEntry.java b/src/main/java/com/gitblit/models/DailyLogEntry.java index db605268..a459d76f 100644 --- a/src/main/java/com/gitblit/models/DailyLogEntry.java +++ b/src/main/java/com/gitblit/models/DailyLogEntry.java @@ -19,6 +19,7 @@ import java.io.Serializable; import java.util.Date; import org.eclipse.jgit.lib.PersonIdent; +import org.eclipse.jgit.transport.ReceiveCommand; /** * Model class to simulate a push for presentation in the push log news feed @@ -56,4 +57,25 @@ public class DailyLogEntry extends PushLogEntry implements Serializable { return super.getAuthorIdent(); } + + /** + * Tracks the change type for the specified ref. + * + * @param ref + * @param type + * @param oldId + * @param newId + */ + public void updateRef(String ref, ReceiveCommand.Type type, String oldId, String newId) { + // daily digests are filled from most recent to oldest + String preservedNewId = getNewId(ref); + if (preservedNewId == null) { + // no preserved new id, this is newest commit + // for this ref + preservedNewId = newId; + } + refUpdates.put(ref, type); + refIdChanges.put(ref, oldId + "-" + preservedNewId); + } + } |