Apply fa00f5afe9 through c12d33c100 from wariocrm
authorTim Otten <to-git@think.hm>
Fri, 1 Mar 2013 06:29:11 +0000 (01:29 -0500)
committerTim Otten <to-git@think.hm>
Fri, 1 Mar 2013 06:29:11 +0000 (01:29 -0500)
12 files changed:
.gitignore
bin/gitify [new file with mode: 0755]
distmaker/distmaker.conf.dist
distmaker/distmaker.sh
distmaker/dists/drupal6_php5.sh
distmaker/dists/drupal_php5.sh
distmaker/dists/drupal_sk_php5.sh
distmaker/dists/joomla_php5.sh
distmaker/dists/wordpress_php5.sh
tools/bin/scripts/cli.php
tools/scripts/phpdoc
tools/scripts/phpunit

index e7683df559d8d3dd9e7761a01777940608f18654..0fe370577c16b887fb70a2c263634d7fe782f8eb 100644 (file)
@@ -1,2 +1,142 @@
 *~
 *.bak
+CRM/ACL/DAO
+CRM/Activity/DAO
+CRM/Auction/DAO
+CRM/Campaign/DAO
+CRM/Case/DAO
+CRM/Case/xml/configuration
+CRM/Contact/DAO/ACLContactCache.php
+CRM/Contact/DAO/Contact.php
+CRM/Contact/DAO/ContactType.php
+CRM/Contact/DAO/DashboardContact.php
+CRM/Contact/DAO/Group.php
+CRM/Contact/DAO/GroupContact.php
+CRM/Contact/DAO/GroupContactCache.php
+CRM/Contact/DAO/GroupNesting.php
+CRM/Contact/DAO/GroupOrganization.php
+CRM/Contact/DAO/Relationship.php
+CRM/Contact/DAO/RelationshipType.php
+CRM/Contact/DAO/SavedSearch.php
+CRM/Contact/DAO/SubscriptionHistory.php
+CRM/Contribute/DAO
+CRM/Core/DAO/.listAll.php
+CRM/Core/DAO/ActionLog.php
+CRM/Core/DAO/ActionMapping.php
+CRM/Core/DAO/ActionSchedule.php
+CRM/Core/DAO/Address.php
+CRM/Core/DAO/AddressFormat.php
+CRM/Core/DAO/Batch.php
+CRM/Core/DAO/Cache.php
+CRM/Core/DAO/Component.php
+CRM/Core/DAO/Country.php
+CRM/Core/DAO/County.php
+CRM/Core/DAO/Currency.php
+CRM/Core/DAO/CustomField.php
+CRM/Core/DAO/CustomGroup.php
+CRM/Core/DAO/Dashboard.php
+CRM/Core/DAO/Discount.php
+CRM/Core/DAO/Domain.php
+CRM/Core/DAO/Email.php
+CRM/Core/DAO/EntityBatch.php
+CRM/Core/DAO/EntityFile.php
+CRM/Core/DAO/EntityFinancialTrxn.php
+CRM/Core/DAO/EntityTag.php
+CRM/Core/DAO/Extension.php
+CRM/Core/DAO/File.php
+CRM/Core/DAO/FinancialAccount.php
+CRM/Core/DAO/FinancialTrxn.php
+CRM/Core/DAO/IM.php
+CRM/Core/DAO/Job.php
+CRM/Core/DAO/JobLog.php
+CRM/Core/DAO/LineItem.php
+CRM/Core/DAO/LocBlock.php
+CRM/Core/DAO/LocationType.php
+CRM/Core/DAO/Log.php
+CRM/Core/DAO/MailSettings.php
+CRM/Core/DAO/Managed.php
+CRM/Core/DAO/Mapping.php
+CRM/Core/DAO/MappingField.php
+CRM/Core/DAO/Menu.php
+CRM/Core/DAO/MessageTemplates.php
+CRM/Core/DAO/Navigation.php
+CRM/Core/DAO/Note.php
+CRM/Core/DAO/OpenID.php
+CRM/Core/DAO/OptionGroup.php
+CRM/Core/DAO/OptionValue.php
+CRM/Core/DAO/PaymentProcessor.php
+CRM/Core/DAO/PaymentProcessorType.php
+CRM/Core/DAO/Persistent.php
+CRM/Core/DAO/Phone.php
+CRM/Core/DAO/Preferences.php
+CRM/Core/DAO/PreferencesDate.php
+CRM/Core/DAO/PrevNextCache.php
+CRM/Core/DAO/PriceField.php
+CRM/Core/DAO/PriceSet.php
+CRM/Core/DAO/PriceSetEntity.php
+CRM/Core/DAO/Setting.php
+CRM/Core/DAO/StateProvince.php
+CRM/Core/DAO/Tag.php
+CRM/Core/DAO/Timezone.php
+CRM/Core/DAO/UFField.php
+CRM/Core/DAO/UFGroup.php
+CRM/Core/DAO/UFJoin.php
+CRM/Core/DAO/UFMatch.php
+CRM/Core/DAO/Website.php
+CRM/Core/DAO/Worldregion.php
+CRM/Core/I18n/SchemaStructure.php
+CRM/Dedupe/DAO
+CRM/Event/Cart/DAO
+CRM/Event/DAO
+CRM/Friend/DAO
+CRM/Grant/DAO
+CRM/Mailing/DAO
+CRM/Mailing/Event/DAO
+CRM/Member/DAO
+CRM/PCP/DAO
+CRM/Pledge/DAO
+CRM/Price/DAO
+CRM/Project/DAO
+CRM/Queue/DAO
+CRM/Report/DAO
+CRM/SMS/DAO
+CRM/Standalone/OpenID/DAO
+bin/setup.conf
+civicrm-version.php
+civicrm-version.txt
+civicrm.config.php
+install/langs.php
+packages/.channels
+packages/.depdb
+packages/.depdblock
+packages/.filemap
+packages/.lock
+packages/.registry
+packages/cache
+packages/doc
+packages/temp
+packages/test
+settings_location.php
+sql/civicrm.mysql
+sql/civicrm_acl.??_??.mysql
+sql/civicrm_acl.mysql
+sql/civicrm_data.??_??.mysql
+sql/civicrm_data.mysql
+sql/civicrm_drop.mysql
+sql/civicrm_navigation.mysql
+sql/civicrm_sample.mysql
+templates/CRM/common/version.tpl
+tests/phpunit/CiviTest/CiviSeleniumSettings.php
+tests/phpunit/CiviTest/civicrm.settings.php
+tools/stats/config.php
+authors.txt
+CRM/Batch/DAO/
+CRM/Financial/DAO/
+drupal/
+WordPress
+joomla
+packages/
+tests/phpunit/CiviTest/civicrm.settings.local.php
+l10n
+
+vendor
diff --git a/bin/gitify b/bin/gitify
new file mode 100755 (executable)
index 0000000..13b0f2b
--- /dev/null
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+## Take an existing, tar-based CiviCRM directory and convert it to a git working directory
+
+#### Helpers ####
+
+## usage: do_gitify <repo-url> <existing-dir> [git-checkout-options]
+function do_gitify() {
+  REPO="$1"
+  TGT="$2"
+  TMP="${TGT}.tmp"
+  shift 2
+
+  if [ -d "$TGT/.git" ]; then
+    echo "[[Already checked out git repo ($TGT) -- skip $REPO]]"
+    return
+  fi
+  [ -d $TGT ] || mkdir -p "$TGT"
+  [ -d $TMP ] && rm -rf "$TMP"
+  echo "[[Checkout $REPO ($TMP)]]"
+  echo "[git clone "$@" "$REPO" "$TMP"]"
+  git clone "$@" "$REPO" "$TMP"
+
+  echo "[[Swap metadata]]"
+  mv "$TMP/.git" "$TGT/.git"
+
+  echo "[[Remove local modifications]]"
+  pushd "$TGT" > /dev/null
+  git checkout -- .
+  popd > /dev/null
+
+  rm -rf "$TMP"
+}
+
+## usage: do_svnify <repo-url> <existing-dir>
+function do_svnify() {
+  REPO="$1"
+  TGT="$2"
+  shift 2
+
+  if [ -d "$TGT/.svn" ]; then
+    echo "[[Already checked out SVN repo ($TGT) -- skip $REPO]]"
+    return
+  fi
+  [ -d $TGT ] || mkdir -p "$TGT"
+  [ -d $TMP ] && rm -rf "$TMP"
+  echo "[[Checkout $REPO ($TMP)]]"
+
+  echo "[svn co \"$REPO\" \"$TGT\"]"
+  svn co "$REPO" "$TGT"
+}
+
+function check_dep() {
+  if [ -z `which git` ]; then
+    echo "command not found: git"
+    exit
+  fi
+}
+
+#### Main ####
+
+set -e
+
+CIVICRM_CMS="$1"
+GIT_BASE_URL="$2"
+CIVICRM_ROOT="$3"
+CIVICRM_L10N="$4"
+CIVICRM_BRANCH="master"
+if [ -z "$CIVICRM_ROOT" -o ! -d "$CIVICRM_ROOT" -o -z "$GIT_BASE_URL" -o -z "$CIVICRM_CMS" ]; then
+  echo "Convert a directory into a set of CiviCRM git clones"
+  echo "usage: $0 <Drupal|Drupal6|Joomla|WordPress|all> <git-base-url> <existing-civicrm-root> [--l10n]"
+  echo "  <cms-name>: one of: Drupal|Drupal6|Joomla|WordPress|all"
+  echo "  <git-base-url>: a base URL shared by the desiried git repos (e.g. git://github.com/civicrm)"
+  echo "  <existing-civicrm-root>: the main directory containing CiviCRM"
+  echo "  [l10n]: optionally fetch localization data; currently requires svn"
+  echo ""
+  echo "Note: If pointing to a pre-existing directory, your local changes may be replaced by"
+  echo "the pristine code from git/svn. If you've made changes, then make sure there's a backup!"
+  echo ""
+  echo "example: $0 Drupal git://github.com/wariocrm /var/www/drupal7/sites/all/modules/civicrm"
+  echo "  (checkout core code plus Drupal 7.x integration code using Git's read-only protocol)"
+  echo ""
+  echo "example: $0 Drupal6 https://github.com/wariocrm /var/www/drupal6/sites/all/modules/civicrm"
+  echo "  (checkout core code plus Drupal 6.x integration code using read-only HTTP protocol)"
+  echo ""
+  echo "example: $0 all git@github.com:wariocrm ~/src/civicrm l10n"
+  echo "  (checkout core code plus Drupal 7.x, Joomla, and WordPress integration code and l10n using SSH)"
+  exit 1
+fi
+
+check_dep
+do_gitify "${GIT_BASE_URL}/civicrm-core.git" "$CIVICRM_ROOT" -b "${CIVICRM_BRANCH}"
+do_gitify "${GIT_BASE_URL}/civicrm-packages.git" "$CIVICRM_ROOT/packages" -b "${CIVICRM_BRANCH}"
+case "$CIVICRM_CMS" in
+  Drupal)
+    do_gitify "${GIT_BASE_URL}/civicrm-drupal.git" "$CIVICRM_ROOT/drupal" -b "${CIVICRM_BRANCH}-7.x"
+    ;;
+  Drupal6)
+    do_gitify "${GIT_BASE_URL}/civicrm-drupal.git" "$CIVICRM_ROOT/drupal" -b "${CIVICRM_BRANCH}-6.x"
+    ;;
+  Joomla)
+    do_gitify "${GIT_BASE_URL}/civicrm-joomla.git" "$CIVICRM_ROOT/joomla" -b "${CIVICRM_BRANCH}"
+    ;;
+  WordPress)
+    do_gitify "${GIT_BASE_URL}/civicrm-wordpress.git" "$CIVICRM_ROOT/WordPress" -b "${CIVICRM_BRANCH}"
+    ;;
+  all)
+    do_gitify "${GIT_BASE_URL}/civicrm-drupal.git" "$CIVICRM_ROOT/drupal" -b "${CIVICRM_BRANCH}-7.x"
+    do_gitify "${GIT_BASE_URL}/civicrm-joomla.git" "$CIVICRM_ROOT/joomla" -b "${CIVICRM_BRANCH}"
+    do_gitify "${GIT_BASE_URL}/civicrm-wordpress.git" "$CIVICRM_ROOT/WordPress" -b "${CIVICRM_BRANCH}"
+    ;;
+  *)
+    echo "Unrecognized CMS: $CIVICRM_CMS"
+esac
+
+if [ "$CIVICRM_L10N" == "--l10n" ]; then
+  do_svnify "http://svn.civicrm.org/l10n/trunk" "$CIVICRM_ROOT/l10n"
+fi
index 98ec430433154138de57c1f7f2203803d1f55b50..b10156c09c7b8ec2d0bc1d3999ccd6f7c1ec1e53 100644 (file)
@@ -1,8 +1,19 @@
+#!/bin/bash
 DM_SOURCEDIR= <Set this to your repository checkout root>
 DM_GENFILESDIR= <Set this to directory where generated files should reside>
 DM_TMPDIR= <Set this to temporary directory>
 DM_TARGETDIR= <Set this to directory where tarballs should land>
+
 DM_PHP= <Set this to your php binary>
 DM_RSYNC= <set this to your rsync binary>
-DM_VERSION= <Set this to whatever the version number should be>
 DM_ZIP= <set this to your zip binary>
+
+DM_VERSION= <Set this to whatever the version number should be>
+
+## Git banch/tag name
+DM_REF_CORE=master
+DM_REF_DRUPAL=${DM_REF_CORE}-7.x
+DM_REF_DRUPAL6=${DM_REF_CORE}-6.x
+DM_REF_JOOMLA=${DM_REF_CORE}
+DM_REF_WORDPRESS=${DM_REF_CORE}
+DM_REF_PACKAGES=${DM_REF_CORE}
index a98ab5d9a08c485a20f35fd84261e298d25e8984..a685b8695cc993967321f2af9d150672d1db38d1 100755 (executable)
@@ -149,6 +149,17 @@ case $1 in
 
 esac
 
+## Make sure we have the right branch or tag
+pushd "$DM_SOURCEDIR"
+git checkout "$DM_REF_CORE"
+popd
+pushd "$DM_SOURCEDIR/packages"
+git checkout "$DM_REF_PACKAGES"
+popd
+## in theory, this shouldn't matter, but GenCode is CMS-dependent, and we've been doing our past builds based on D7
+pushd "$DM_SOURCEDIR/drupal"
+git checkout "$DM_REF_DRUPAL"
+popd
 
 # Before anything - regenerate DAOs
 
index 4987ce618b237569f3c48686fef0189416cd5437..68c321e5e9f98105c47c7db1fb1b53259c601ded 100755 (executable)
@@ -20,6 +20,11 @@ RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS"
 SRC=$DM_SOURCEDIR
 TRG=$DM_TMPDIR/civicrm
 
+# checkout the right code revisions
+pushd "$DM_SOURCEDIR/drupal"
+git checkout "$DM_REF_DRUPAL6"
+popd
+
 # make sure and clean up before
 if [ -d $TRG ] ; then
        rm -rf $TRG/*
index 2b8dfe70a5827c674f251016405789531fe7a8e3..151342576593f6301ad4a7718df022d7e581e941 100755 (executable)
@@ -20,6 +20,11 @@ RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS"
 SRC=$DM_SOURCEDIR
 TRG=$DM_TMPDIR/civicrm
 
+# checkout the right code revisions
+pushd "$DM_SOURCEDIR/drupal"
+git checkout "$DM_REF_DRUPAL"
+popd
+
 # make sure and clean up before
 if [ -d $TRG ] ; then
        rm -rf $TRG/*
index 4b791c35985173a6b398a2285e8e07521f90af00..9a648c70f85ba737e81389244855c2d3711cfdd6 100755 (executable)
@@ -20,6 +20,11 @@ RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS"
 SRC=$DM_SOURCEDIR
 TRG=$DM_TMPDIR/civicrm
 
+# checkout the right code revisions
+pushd "$DM_SOURCEDIR/drupal"
+git checkout "$DM_REF_DRUPAL"
+popd
+
 # make sure and clean up before
 if [ -d $TRG ] ; then
        rm -rf $TRG/*
index 4700eced8d578875e4e9456788d92efee78c2d36..fd727b23441729e8920770cf0701bce2bfc47352 100755 (executable)
@@ -20,6 +20,11 @@ RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS"
 SRC=$DM_SOURCEDIR
 TRG=$DM_TMPDIR/civicrm
 
+# checkout the right code revisions
+pushd "$DM_SOURCEDIR/joomla"
+git checkout "$DM_REF_JOOMLA"
+popd
+
 # make sure and clean up before
 if [ -d $TRG ] ; then
        rm -rf $TRG/*
index 32d26a6e2e85762756663981203529457a34b293..e1cc44968bf28ae6ae3e02ea7a10ec219cbeb8eb 100644 (file)
@@ -20,6 +20,11 @@ RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS"
 SRC=$DM_SOURCEDIR
 TRG=$DM_TMPDIR/civicrm
 
+# checkout the right code revisions
+pushd "$DM_SOURCEDIR/WordPress"
+git checkout "$DM_REF_WORDPRESS"
+popd
+
 # make sure and clean up before
 if [ -d $TRG ] ; then
        rm -rf $TRG/*
index 816729844168f192c1a2100b1f02c7fa2a2316b6..4db7feaa1a4431bf54465fafeee0108de0b99bb6 100644 (file)
@@ -33,7 +33,7 @@
  ?>
 
  */
-$include_path = "packages/:" . get_include_path();
+$include_path = "../packages/:" . get_include_path();
 set_include_path($include_path);
 class civicrm_CLI {
 
index 73cb4af6b622fc113ed29c256d4053d849da4f6a..57b9c1f23c2bd3cd44287537c9dd4cc2f575e073 100755 (executable)
@@ -42,5 +42,5 @@ $base_dir = dirname( dirname( __FILE__ ) );
 // require config to get CiviCRM related include paths straight
 require_once '../civicrm.config.php';
 
-require "$base_dir/packages/PhpDocumentor/phpDocumentor/phpdoc.inc";
+require "$base_dir/../packages/PhpDocumentor/phpDocumentor/phpdoc.inc";
 ?>
index 7b1012daf3b91f4058234766afc4678a096cde34..5eaed2dfc01cf3dac673c982f7476978b9e6f4b7 100755 (executable)
  */
 
 $GLOBALS['base_dir'] = dirname( dirname( dirname( __FILE__ ) ) );
-$tools_pkgs_dir = $GLOBALS['base_dir'] . DIRECTORY_SEPARATOR . 'tools' . DIRECTORY_SEPARATOR . 'packages';
 $tests_dir = $GLOBALS['base_dir']  . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'phpunit';
 $civi_pkgs_dir = $GLOBALS['base_dir'] .   DIRECTORY_SEPARATOR . 'packages';
 ini_set('safe_mode', 0);
 ini_set('include_path',
         "{$GLOBALS['base_dir']}" . PATH_SEPARATOR .
-        "$tools_pkgs_dir"       . PATH_SEPARATOR .
         "$tests_dir"            . PATH_SEPARATOR .
         "$civi_pkgs_dir"        . PATH_SEPARATOR
         . ini_get( 'include_path') );
@@ -68,6 +66,7 @@ require 'PHPUnit/TextUI/Command.php';
 define('PHPUnit_MAIN_METHOD', 'PHPUnit_TextUI_Command::main');
 
 require dirname(__FILE__) . DIRECTORY_SEPARATOR .
+       '..' . DIRECTORY_SEPARATOR .
        '..' . DIRECTORY_SEPARATOR .
        'packages' . DIRECTORY_SEPARATOR .
        'PHPUnit' . DIRECTORY_SEPARATOR .