531317: Release of Bugzilla 5.1.2, 5.0.4, and 4.4.13

Change-Id: Ic04b557d3e26858ca983b6a7ed89aebc793fd32a
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=531317
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties
index d068ced..d0a6e68 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties
@@ -126,7 +126,7 @@
 BugzillaOperation_unconfirmed=Unconfirm (change status to UNCONFIRMED)
 BugzillaOperation_verified=Verify as
 
-BugzillaRepositoryConnector_BUGZILLA_CONNECTOR_LABEL=Bugzilla (supports 3.6 and later)
+BugzillaRepositoryConnector_BUGZILLA_CONNECTOR_LABEL=Bugzilla (supports 4.4 and later)
 BugzillaRepositoryConnector_Check_repository_configuration=Check repository configuration: {0}
 BugzillaRepositoryConnector_checking_for_changed_tasks=Checking for changed tasks
 BugzillaRepositoryConnector_Query_for_changed_tasks=Query for changed tasks
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
index d28d91c..f07e1fc 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
@@ -23,59 +23,47 @@
   
   /* Sites */
 
-  bugzilla::site { "bugzilla-4.0.18":
-    major   => "4",
-    minor   => "0",
-    micro   => "18",
-  }
-
-  bugzilla::site { "bugzilla-4.2.16":
-    major   => "4",
-    minor   => "2",
-    micro   => "16",
-  }
-
-  bugzilla::site { "bugzilla-4.4.12-bugaliases":
+  bugzilla::site { "bugzilla-4.4.13-bugaliases":
     major         => "4",
     minor         => "4",
-    micro         => "12",
+    micro         => "13",
     usebugaliases => true,
   }
 
-  bugzilla::site { "bugzilla-4.4.12":
+  bugzilla::site { "bugzilla-4.4.13":
     major      => "4",
     minor      => "4",
-    micro      => "12",
+    micro      => "13",
     envdefault => true,
   }
 
-  bugzilla::site { "bugzilla-4.4.12-custom-wf":
+  bugzilla::site { "bugzilla-4.4.13-custom-wf":
     major       => "4",
     minor       => "4",
-    micro       => "12",
+    micro       => "13",
     custom_wf   => true,
   }
 
-  bugzilla::site { "bugzilla-4.4.12-custom-wf-and-status":
+  bugzilla::site { "bugzilla-4.4.13-custom-wf-and-status":
     major                => "4",
     minor                => "4",
-    micro                => "12",
+    micro                => "13",
     custom_wf_and_status => true,
   }
 
-  bugzilla::site { "bugzilla-5.0.3":
+  bugzilla::site { "bugzilla-5.0.4":
     major       => "5",
     minor       => "0",
-    micro       => "3",
+    micro       => "4",
   }
 
   bugzilla::site { "bugzilla-master":
     major       => "5",
     minor       => "1",
-    micro       => "1",
+    micro       => "2",
     branch      => "master",
     branchTag   => "HEAD",
-    envversion  => "5.1.1+",
+    envversion  => "5.1.2+",
     envinfo     => "Master",
   }
 
@@ -83,10 +71,10 @@
  * REST sites
  *******************************************************************************/
 
-  bugzilla::site { "bugzilla-rest-5.0.3":
+  bugzilla::site { "bugzilla-rest-5.0.4":
     major           => "5",
     minor           => "0",
-    micro           => "3",
+    micro           => "4",
     envtype         => "bugzillaREST",
     rest_enabled    => true,
     envdefault_rest => true,
@@ -96,20 +84,20 @@
   bugzilla::site { "bugzilla-rest-master":
     major           => "5",
     minor           => "1",
-    micro           => "1",
+    micro           => "2",
     branch          => "master",
     branchTag       => "HEAD",
-    envversion      => "5.1.1+",
+    envversion      => "5.1.2+",
     envinfo         => "Master",
     envtype         => "bugzillaREST",
     rest_enabled    => true,
     testdataVersion => "Version2",
   }
 
-  bugzilla::site { "bugzilla-rest-apikey-5.0.3":
+  bugzilla::site { "bugzilla-rest-apikey-5.0.4":
     major           => "5",
     minor           => "0",
-    micro           => "3",
+    micro           => "4",
     envtype         => "bugzillaREST",
     rest_enabled    => true,
     testdataVersion => "Version1",
@@ -119,10 +107,10 @@
   bugzilla::site { "bugzilla-rest-apikey-master":
     major           => "5",
     minor           => "1",
-    micro           => "1",
+    micro           => "2",
     branch          => "master",
     branchTag       => "HEAD",
-    envversion      => "5.1.1+",
+    envversion      => "5.1.2+",
     envinfo         => "Master, APIKEY enabled",
     envtype         => "bugzillaREST",
     rest_enabled    => true,
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
index e3e227f..27b8e64 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
@@ -116,19 +116,18 @@
 
   if $branch == "master" {
     if $branchTagInternal == "HEAD" {
-      exec { "master master git fetch $bugzillaDir":
-        command => "git fetch",
+      exec { "master master git pull $bugzillaDir":
+        command => "git pull",
         onlyif    => "/usr/bin/test -d $base/$bugzillaDir",
         cwd     => "$base/$bugzillaDir",
-        user => "$userOwner",
         timeout => 360,
         logoutput => true,
         require   => Exec["prepare bugzilla"],
+        notify => Exec["end extract bugzilla $bugzillaDir"],
       }
       exec { "master master git clone $bugzillaDir":
         command => "git clone https://github.com/bugzilla/bugzilla $base/$bugzillaDir",
         cwd     => "$base",
-        user => "$userOwner",
         timeout => 360,
         creates => "$base/$bugzillaDir",
         require   => Exec["prepare bugzilla"],
@@ -138,7 +137,6 @@
       exec { "master $branchTagInternal git clone $bugzillaDir":
         command => "git clone -b $branch https://github.com/bugzilla/bugzilla $base/$bugzillaDir",
         cwd     => "$base",
-        user => "$userOwner",
         timeout => 360,
         creates => "$base/$bugzillaDir",
         require   => Exec["prepare bugzilla"],
@@ -146,7 +144,6 @@
       exec { "master $branchTagInternal git checkout $bugzillaDir":
         command => "git checkout $branchTagInternal",
         cwd     => "$base/$bugzillaDir",
-        user => "$userOwner",
         logoutput => true,
         timeout => 360,
         require   => Exec["master $branchTagInternal git clone $bugzillaDir"],
@@ -154,11 +151,10 @@
       }
     }
   } else {
-    exec { "$branch $branchTagInternal git fetch $bugzillaDir":
-      command => "git fetch",
+    exec { "$branch $branchTagInternal git pull $bugzillaDir":
+      command => "git reset --hard $branchTagInternal;git pull origin $branchTagInternal",
       onlyif    => "/usr/bin/test -d $base/$bugzillaDir",
       cwd     => "$base/$bugzillaDir",
-      user => "$userOwner",
       timeout => 360,
       logoutput => true,
       require   => Exec["prepare bugzilla"],
@@ -168,27 +164,10 @@
     exec { "$branch $branchTagInternal git clone $bugzillaDir":
       command => "git clone -b $branch https://github.com/bugzilla/bugzilla $base/$bugzillaDir",
       cwd     => "$base",
-      user => "$userOwner",
       timeout => 360,
       creates => "$base/$bugzillaDir",
-      require   => Exec["$branch $branchTagInternal git fetch $bugzillaDir"],
-    }
-    if $branchTagInternal == "HEAD" {
-      exec { "$branch $branchTagInternal dummy git checkout $bugzillaDir":
-        command => "echo '$branch $branchTagInternal dummy git checkout $bugzillaDir'",
-        logoutput => true,
-        require   => Exec["$branch $branchTagInternal git clone $bugzillaDir"],
-        notify => Exec["end extract bugzilla $bugzillaDir"],
-      }
-    } else {
-      exec { "$branch $branchTagInternal git checkout $bugzillaDir":
-        command => "git checkout $branchTagInternal",
-        cwd     => "$base/$bugzillaDir",
-        user => "$userOwner",
-        timeout => 360,
-        require   => Exec["$branch $branchTagInternal git clone $bugzillaDir"],
-        notify => Exec["end extract bugzilla $bugzillaDir"],
-      }
+      require   => Exec["$branch $branchTagInternal git pull $bugzillaDir"],
+      notify => Exec["end extract bugzilla $bugzillaDir"],
     }
   }
 
@@ -209,7 +188,6 @@
     command => "$base/$bugzillaDir/installPerlModules.sh  >$base/$bugzillaDir/CGI.out",
     cwd     => "$base/$bugzillaDir",
     creates => "$base/$bugzillaDir/CGI.out",
-    user => "$userOwner",
     timeout => 360,
     require   => File["$base/$bugzillaDir/installPerlModules.sh"]
   }
@@ -280,7 +258,6 @@
     command => "$base/$bugzillaDir/checksetup.pl $base/$bugzillaDir/answers || exit 0",
     cwd     => "$base/$bugzillaDir",
     creates => "$base/$bugzillaDir/localconfig",
-    user => "$userOwner",
     logoutput => true,
     require => [
       Exec["mysql-createdb-$bugzillaDir"],
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaAttachmentHandlerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaAttachmentHandlerTest.java
index 9d8a70c..a9a1ec3 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaAttachmentHandlerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaAttachmentHandlerTest.java
@@ -11,6 +11,8 @@
 
 package org.eclipse.mylyn.bugzilla.tests;
 
+import static org.junit.Assume.assumeTrue;
+
 import java.io.BufferedOutputStream;
 import java.io.BufferedWriter;
 import java.io.File;
@@ -305,6 +307,9 @@
 	}
 
 	public void testAttachmentWithUnicode() throws Exception {
+		String osName = System.getProperty("os.name").toLowerCase();
+		assumeTrue(!osName.startsWith("mac os x"));
+		// macos X with APFS can not handle this
 		testAttachmentWithSpecialCharacters(
 				"\u00E7\u00F1\u00A5\u20AC\u00A3\u00BD\u00BC\u03B2\u03B8\u53F0\u5317\u3096\u3097\uFF73");
 	}