From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit,  gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command

---
 src/com/gitblit/models/FeedModel.java |   29 ++++++++++++-----------------
 1 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/src/com/gitblit/models/FeedModel.java b/src/com/gitblit/models/FeedModel.java
index 67cff95..08f9e48 100644
--- a/src/com/gitblit/models/FeedModel.java
+++ b/src/com/gitblit/models/FeedModel.java
@@ -16,9 +16,6 @@
 package com.gitblit.models;
 
 import java.io.Serializable;
-import java.text.MessageFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.Date;
 
 import com.gitblit.utils.StringUtils;
@@ -32,8 +29,8 @@
 
 	public String repository;
 	public String branch;
-	public int maxRetrieval;
-	public Date lastRefresh;
+	public Date lastRefreshDate;
+	public Date currentRefreshDate;
 
 	public boolean subscribed;
 
@@ -41,34 +38,32 @@
 
 	public FeedModel() {
 		this("");
+		subscribed = false;
 	}
 
 	public FeedModel(String definition) {
-		maxRetrieval = -1;
-		lastRefresh = new Date(0);
+		subscribed = true;
+		lastRefreshDate = new Date(0);
+		currentRefreshDate = new Date(0);
 
 		String[] fields = definition.split(":");
 		repository = fields[0];
 		if (fields.length > 1) {
 			branch = fields[1];
-			maxRetrieval = Integer.parseInt(fields[2]);
-			try {
-				lastRefresh = new SimpleDateFormat("yyyyMMddHHmmss").parse(fields[3]);
-			} catch (ParseException e) {
-			}
-			subscribed = true;
 		}
 	}
 
 	@Override
 	public String toString() {
-		return MessageFormat.format("{0}:{1}:{2,number,0}:{3,date,yyyyMMddHHmmss}", repository,
-				branch, maxRetrieval, lastRefresh);
+		if (StringUtils.isEmpty(branch)) {
+			return repository;
+		}
+		return repository + ":" + branch;
 	}
 
 	@Override
 	public int compareTo(FeedModel o) {
-		int repositoryCompare = repository.compareTo(o.repository);
+		int repositoryCompare = StringUtils.compareRepositoryNames(repository, o.repository);
 		if (repositoryCompare == 0) {
 			// same repository
 			if (StringUtils.isEmpty(branch)) {
@@ -83,7 +78,7 @@
 
 	@Override
 	public int hashCode() {
-		return (repository + (StringUtils.isEmpty(branch) ? "" : branch)).toLowerCase().hashCode();
+		return toString().toLowerCase().hashCode();
 	}
 
 	@Override

--
Gitblit v1.9.1