From 8051a29d8b3826772e5be1851eb72cd52ab5080c Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 13 Jan 2012 08:04:06 -0500
Subject: [PATCH] Fixed upgrade bug in user service (issue 41)

---
 docs/04_releases.mkd                    |    7 +++++++
 src/com/gitblit/GitblitUserService.java |    4 ++--
 src/com/gitblit/Constants.java          |    4 ++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index 78effe7..c51c2d7 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -1,10 +1,17 @@
 ## Release History
 
 ### Current Release
+
 **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%) | [war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%) | [express](http://code.google.com/p/gitblit/downloads/detail?name=%EXPRESS%) | [fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%) | [manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%) | [api](http://code.google.com/p/gitblit/downloads/detail?name=%API%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
 
 #### fixes
 
+- Fixed bug when upgrading from users.properties to users.conf (issue 41)
+
+**0.8.1** ([go](http://code.google.com/p/gitblit/downloads/detail?name=gitblit-0.8.1.zip) | [war](http://code.google.com/p/gitblit/downloads/detail?name=gitblit-0.8.1.war) | [express](http://code.google.com/p/gitblit/downloads/detail?name=express-0.8.1.zip) | [fedclient](http://code.google.com/p/gitblit/downloads/detail?name=fedclient-0.8.1.zip) | [manager](http://code.google.com/p/gitblit/downloads/detail?name=manager-0.8.1.zip) | [api](http://code.google.com/p/gitblit/downloads/detail?name=gbapi-0.8.1.zip)) based on [JGit 1.2.0 (201112221803-r)][jgit] &nbsp; *released 2012-01-11*
+
+#### fixes
+
 - Include missing icon resource for the manager (issue 40)
 - Fixed sendmail.groovy message content with incorrect tag/branch labels
 
diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java
index a28a871..cedda6f 100644
--- a/src/com/gitblit/Constants.java
+++ b/src/com/gitblit/Constants.java
@@ -29,11 +29,11 @@
 
 	// The build script extracts this exact line so be careful editing it
 	// and only use A-Z a-z 0-9 .-_ in the string.
-	public static final String VERSION = "0.9.0-SNAPSHOT";
+	public static final String VERSION = "0.8.2";
 
 	// The build script extracts this exact line so be careful editing it
 	// and only use A-Z a-z 0-9 .-_ in the string.
-	public static final String VERSION_DATE = "PENDING";
+	public static final String VERSION_DATE = "2012-01-13";
 
 	// The build script extracts this exact line so be careful editing it
 	// and only use A-Z a-z 0-9 .-_ in the string.
diff --git a/src/com/gitblit/GitblitUserService.java b/src/com/gitblit/GitblitUserService.java
index eddc8a3..7462af0 100644
--- a/src/com/gitblit/GitblitUserService.java
+++ b/src/com/gitblit/GitblitUserService.java
@@ -95,8 +95,8 @@
 				logger.info(MessageFormat.format("Automatically creating {0} based on {1}",
 						usersConfig.getAbsolutePath(), realmFile.getAbsolutePath()));
 				ConfigUserService configService = new ConfigUserService(usersConfig);
-				for (String username : serviceImpl.getAllUsernames()) {
-					UserModel userModel = serviceImpl.getUserModel(username);
+				for (String username : service.getAllUsernames()) {
+					UserModel userModel = service.getUserModel(username);
 					configService.updateUserModel(userModel);
 				}
 			}

--
Gitblit v1.9.1