Index: xcvs-commitinfo.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol_cvs/xcvs/xcvs-commitinfo.php,v
retrieving revision 1.6
diff -u -r1.6 xcvs-commitinfo.php
--- xcvs-commitinfo.php	2 Dec 2007 01:13:34 -0000	1.6
+++ xcvs-commitinfo.php	8 Jan 2008 01:50:12 -0000
@@ -83,12 +83,12 @@
   include_once $config_file;
 
   // Check temporary file storage.
-  $tempdir = xcvs_get_temp_directory($xcvs['temp']);
+  $tempdir = xcvs_get_temp_directory();
 
   // Admins and other privileged users don't need to go through any checks.
   if (!in_array($username, $xcvs['allowed_users'])) {
     // Do a full Drupal bootstrap.
-    xcvs_bootstrap($xcvs['drupal_path']);
+    xcvs_bootstrap();
 
     // Construct a minimal commit array.
     $commit = array(
Index: xcvs-config.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol_cvs/xcvs/xcvs-config.php,v
retrieving revision 1.13
diff -u -r1.13 xcvs-config.php
--- xcvs-config.php	2 Dec 2007 01:13:34 -0000	1.13
+++ xcvs-config.php	8 Jan 2008 01:50:12 -0000
@@ -36,6 +36,10 @@
 // usernames (not the Drupal username if they're different).
 $xcvs['allowed_users'] = array();
 
+// If you run a multisite installation, specify the directory
+// name that your settings.php file resides in (ex: www.example.com)
+// If you use the default settings.php file, leave this blank.
+$xcvs['multisite_directory'] = '';
 
 // ------------------------------------------------------------
 // Access control
@@ -55,26 +59,36 @@
 // Shared code
 // ------------------------------------------------------------
 
-function xcvs_bootstrap($drupal_path) {
+function xcvs_bootstrap() {
+  global $xcvs_global;
+
   // add $drupal_path to current value of the PHP include_path
-  set_include_path(get_include_path() . PATH_SEPARATOR . $drupal_path);
+  set_include_path(get_include_path() . PATH_SEPARATOR . $xcvs_global['drupal_path']);
 
   $current_directory = getcwd();
-  chdir($drupal_path);
+  chdir($xcvs_global['drupal_path']);
 
   // bootstrap Drupal so we can use drupal functions to access the databases, etc.
   if (!file_exists('./includes/bootstrap.inc')) {
     fwrite(STDERR, "Error: failed to load Drupal's bootstrap.inc file.\n");
     exit(1);
   }
+
+  // Set up the multisite directory if necessary.
+  if ($xcvs_global['multisite_directory']) {
+    $_SERVER['HTTP_HOST'] = $xcvs_global['multisite_directory'];
+  }
+
   require_once './includes/bootstrap.inc';
   drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
 
   chdir($current_directory);
 }
 
-function xcvs_get_temp_directory($temp_path) {
-  $tempdir = preg_replace('/\/+$/', '', $temp_path); // strip trailing slashes
+function xcvs_get_temp_directory() {
+  global $xcvs_global;
+  $tempdir = preg_replace('/\/+$/', '', $xcvs_global['temp']); // strip trailing slashes
+
   if (!(is_dir($tempdir) && is_writeable($tempdir))) {
     fwrite(STDERR, "Error: failed to access the temporary directory ($tempdir).\n");
     exit(2);
Index: xcvs-generate-passwd.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol_cvs/xcvs/xcvs-generate-passwd.php,v
retrieving revision 1.1
diff -u -r1.1 xcvs-generate-passwd.php
--- xcvs-generate-passwd.php	8 Sep 2007 15:33:07 -0000	1.1
+++ xcvs-generate-passwd.php	8 Jan 2008 01:50:12 -0000
@@ -44,7 +44,7 @@
   include_once $config_file;
 
   // Do a full Drupal bootstrap.
-  xcvs_bootstrap($xcvs['drupal_path']);
+  xcvs_bootstrap();
 
   $repository = versioncontrol_get_repository($xcvs['repo_id']);
   if (!isset($repository)) {
Index: xcvs-loginfo.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol_cvs/xcvs/xcvs-loginfo.php,v
retrieving revision 1.22
diff -u -r1.22 xcvs-loginfo.php
--- xcvs-loginfo.php	2 Dec 2007 01:13:34 -0000	1.22
+++ xcvs-loginfo.php	8 Jan 2008 01:50:13 -0000
@@ -118,7 +118,7 @@
   include_once $config_file;
 
   // Check temporary file storage.
-  $tempdir = xcvs_get_temp_directory($xcvs['temp']);
+  $tempdir = xcvs_get_temp_directory();
 
   // The commitinfo script wrote the lastlog file for us.
   // Its only contents is the name of the last directory that commitinfo
@@ -157,7 +157,7 @@
 
     // Do a full Drupal bootstrap. We need it from now on at the latest,
     // starting with the action constants in xcvs_get_commit_action().
-    xcvs_bootstrap($xcvs['drupal_path']);
+    xcvs_bootstrap();
 
     while (!feof($fd)) {
       $file_entry = trim(fgets($fd));
Index: xcvs-posttag.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol_cvs/xcvs/xcvs-posttag.php,v
retrieving revision 1.9
diff -u -r1.9 xcvs-posttag.php
--- xcvs-posttag.php	2 Dec 2007 01:13:34 -0000	1.9
+++ xcvs-posttag.php	8 Jan 2008 01:50:13 -0000
@@ -55,7 +55,7 @@
   include_once $config_file;
 
   // Check temporary file storage.
-  $tempdir = xcvs_get_temp_directory($xcvs['temp']);
+  $tempdir = xcvs_get_temp_directory();
 
   $username = array_shift($argv); // argv[2]
   $tag_name = array_shift($argv); // argv[3]
@@ -64,7 +64,7 @@
   $dir = array_shift($argv);      // argv[6]
 
   // Do a full Drupal bootstrap.
-  xcvs_bootstrap($xcvs['drupal_path']);
+  xcvs_bootstrap();
 
   // The commitinfo script wrote the lastlog file for us.
   // Its only contents is the name of the last directory that commitinfo
Index: xcvs-taginfo.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol_cvs/xcvs/xcvs-taginfo.php,v
retrieving revision 1.11
diff -u -r1.11 xcvs-taginfo.php
--- xcvs-taginfo.php	2 Dec 2007 01:13:34 -0000	1.11
+++ xcvs-taginfo.php	8 Jan 2008 01:50:13 -0000
@@ -40,12 +40,12 @@
   include_once $config_file;
 
   // Check temporary file storage.
-  $tempdir = xcvs_get_temp_directory($xcvs['temp']);
+  $tempdir = xcvs_get_temp_directory();
 
   // Admins and other privileged users don't need to go through any checks.
   if (!in_array($username, $xcvs['allowed_users'])) {
     // Do a full Drupal bootstrap.
-    xcvs_bootstrap($xcvs['drupal_path']);
+    xcvs_bootstrap();
 
     switch ($cvs_op) {
       case 'add':
