Remove EncryptContactInfo helper program

This was last needed to upgrade from Gerrit 2.0.3 to 2.0.4.  Now that
we are developing 2.0.11 we're well past the contact database change,
and any site using Gerrit with contacts should have upgraded itself
by now.

Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/Documentation/config-contact.txt b/Documentation/config-contact.txt
index ee15e42..6521c95 100644
--- a/Documentation/config-contact.txt
+++ b/Documentation/config-contact.txt
@@ -129,44 +129,3 @@
 Using `https://` for the store URL is *highly* encouraged, as it
 prevents man-in-the-middle attacks from reading the shared secret
 APPSEC token, or messing with the data field.
-
-
-
-[[upgrade_203]]
-Upgrading From Gerrit 2.0.3 (or Earlier)
-----------------------------------------
-
-To upgrade from schema 4 (Gerrit 2.0.3 and earlier) to schema 5
-(Gerrit 2.0.4 and later), run the following sequence.
-
-Replace `your-appid` with the Google App Engine application id of
-your contact store application, and `APPSEC` with the value compiled
-into the application when it was uploaded.
-
-The use of Google App Engine isn't required.  It is relatively easy
-to create another web service to receive the application data,
-and point the `contact_store_url` at that server.  See above for
-more details about the form data posted.
-
-====
-  git clone git://android.git.kernel.org/tools/gerrit-contactstore.git
-  cd gerrit-contactstore/google_appengine
-  make update APPID=your-appid
-
-  gpg --export --armor KEYEMAIL >$site_config/contact_information.pub
-
-  java -jar gerrit.war --cat sql/upgrade004_005_part1.sql | psql reviewdb
-  psql -c "UPDATE system_config SET contact_store_url = 'https://your-appid.appspot.com/store'" reviewdb
-  psql -c "UPDATE system_config SET contact_store_appsec = 'APPSEC'" reviewdb
-  java -DGerritServer=GerritServer.properties -cp bcprov-jdk15-141.jar:bcpg-jdk15-141.jar:gerrit.war ExecutableWarMain EncryptContactInfo
-====
-
-It may be a good idea to delay part2.sql until after the existing
-contact information has been archived and has been verified to be
-readable.  The part2 script simply drops the old contact columns
-from the `accounts` table.
-
-====
-  java -jar gerrit.war --cat sql/upgrade004_005_part2.sql | psql reviewdb
-====
-
diff --git a/src/main/java/com/google/gerrit/pgm/EncryptContactInfo.java b/src/main/java/com/google/gerrit/pgm/EncryptContactInfo.java
deleted file mode 100644
index 1a5e6fa..0000000
--- a/src/main/java/com/google/gerrit/pgm/EncryptContactInfo.java
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2008 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.pgm;
-
-import com.google.gerrit.client.reviewdb.Account;
-import com.google.gerrit.client.reviewdb.ContactInformation;
-import com.google.gerrit.client.reviewdb.ReviewDb;
-import com.google.gerrit.client.rpc.Common;
-import com.google.gerrit.client.rpc.ContactInformationStoreException;
-import com.google.gerrit.git.WorkQueue;
-import com.google.gerrit.server.EncryptedContactStore;
-import com.google.gerrit.server.GerritServer;
-import com.google.gwtjsonrpc.server.XsrfException;
-import com.google.gwtorm.client.OrmException;
-import com.google.gwtorm.jdbc.JdbcSchema;
-
-import org.spearce.jgit.lib.ProgressMonitor;
-import org.spearce.jgit.lib.TextProgressMonitor;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-
-/** Export old contact columns to the encrypted contact store. */
-public class EncryptContactInfo {
-  public static void main(final String[] argv) throws OrmException,
-      XsrfException, ContactInformationStoreException, SQLException {
-    try {
-      mainImpl(argv);
-    } finally {
-      WorkQueue.terminate();
-    }
-  }
-
-  private static void mainImpl(final String[] argv) throws OrmException,
-      XsrfException, ContactInformationStoreException, SQLException {
-    final ProgressMonitor pm = new TextProgressMonitor();
-    GerritServer.getInstance();
-    final ReviewDb db = Common.getSchemaFactory().open();
-    try {
-      pm.start(1);
-      pm.beginTask("Enumerate accounts", ProgressMonitor.UNKNOWN);
-      final Connection sql = ((JdbcSchema) db).getConnection();
-      final Statement stmt = sql.createStatement();
-      final ResultSet rs =
-          stmt.executeQuery("SELECT" + " account_id" + ",contact_address"
-              + ",contact_country" + ",contact_phone_nbr" + ",contact_fax_nbr"
-              + " FROM accounts WHERE contact_filed_on IS NOT NULL"
-              + " ORDER BY account_id");
-      final ArrayList<ToDo> todo = new ArrayList<ToDo>();
-      while (rs.next()) {
-        final ToDo d = new ToDo();
-        d.id = new Account.Id(rs.getInt(1));
-        d.info.setAddress(rs.getString(2));
-        d.info.setCountry(rs.getString(3));
-        d.info.setPhoneNumber(rs.getString(4));
-        d.info.setFaxNumber(rs.getString(5));
-        todo.add(d);
-        pm.update(1);
-      }
-      rs.close();
-      stmt.close();
-      pm.endTask();
-
-      pm.start(1);
-      pm.beginTask("Store contact", todo.size());
-      for (final ToDo d : todo) {
-        final Account them = db.accounts().get(d.id);
-        if (them.isContactFiled() && ContactInformation.hasData(d.info)) {
-          EncryptedContactStore.store(them, d.info);
-        }
-        pm.update(1);
-      }
-      pm.endTask();
-    } finally {
-      db.close();
-    }
-  }
-
-  static class ToDo {
-    Account.Id id;
-    final ContactInformation info = new ContactInformation();
-  }
-}