Index: pifr_demo.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pifr_demo/pifr_demo.module,v
retrieving revision 1.8
diff -u -r1.8 pifr_demo.module
--- pifr_demo.module	9 Feb 2010 08:53:26 -0000	1.8
+++ pifr_demo.module	10 Feb 2010 04:39:34 -0000
@@ -154,7 +154,22 @@
     if (PIFR_ACTIVE) {
       if ($test = pifr_server_test_get($test_id)) {
         if ($environments = pifr_server_environment_test_get_all($test_id)) {
-          return pifr_server_test_xmlrpc($test, array_shift($environments));
+          // Get the object related to the test and pass along its link value.
+          if ($test['type'] == PIFR_SERVER_TEST_TYPE_BRANCH) {
+            $object = pifr_server_branch_get_test($test_id);
+          }
+          elseif ($test['type'] == PIFR_SERVER_TEST_TYPE_FILE) {
+            $object = pifr_server_file_get_test($test_id);
+          }
+          else {
+            return array('response' => PIFR_RESPONSE_DENIED);
+          }
+
+          // Add link to review arguments.
+          $xmlrpc = pifr_server_test_xmlrpc($test, array_shift($environments));
+          $xmlrpc['review']['argument']['pifr_demo.link'] = $object['link'];
+
+          return $xmlrpc;
         }
       }
     }
Index: pifr_demo.client.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pifr_demo/pifr_demo.client.inc,v
retrieving revision 1.4
diff -u -r1.4 pifr_demo.client.inc
--- pifr_demo.client.inc	9 Feb 2010 09:33:33 -0000	1.4
+++ pifr_demo.client.inc	10 Feb 2010 04:39:34 -0000
@@ -47,11 +47,25 @@
     $demo_directory = file_directory_path() . '/demo/' . $this->unique_id;
     mkdir($demo_directory);
 
+    // Generate README.txt containing build information.
+    $test_link = variable_get('pifr_client_server', '') . 'pifr/test/' . $this->test['test_id'];
+    $file = !empty($this->test['files'][0]) ? $this->test['files'][0] : 'none';
+    file_put_contents($this->checkout_directory . '/BUILD.txt',
+"-- Generated on " . date('Y-m-d H:i:s') . " --
+
+BUILD INFO
+----------
+Link: {$this->test['review']['argument']['pifr_demo.link']}
+Test: $test_link
+File: $file
+
+Enjoy!
+");
+
     // Generate tarball and zip of checkout.
-    $basename = date('Ymd') . '-' . $this->test['test_id'];
     chdir($this->checkout_directory . '/..');
-    $this->exec('tar -cvzf demo/' . $this->unique_id . '/' . $basename . '.tar.gz checkout');
-    $this->exec('zip -r demo/' . $this->unique_id . '/' . $basename . '.zip checkout');
+    $this->exec('tar -cvzf demo/' . $this->unique_id . '/demo.tar.gz checkout');
+    $this->exec('zip -r demo/' . $this->unique_id . '/demo.zip checkout');
     chdir($this->original['directory']);
 
     // Add an auto-login sniplet to index.php.
@@ -62,7 +76,7 @@
     $contents = str_replace('menu_execute_active_handler();',
 "if (!variable_get('pifr_demo', FALSE)) {
   variable_set('pifr_demo', TRUE);
-  drupal_set_message('Copy of code avaiable as <a href=\"$basename.tar.gz\">tar.gz</a> or <a href=\"$basename.zip\">zip</a>.');
+  drupal_set_message('Copy of code avaiable as <a href=\"demo.tar.gz\">tar.gz</a> or <a href=\"demo.zip\">zip</a>.');
   drupal_goto(user_pass_reset_url(user_load(1)));
 }
 " . $placeholder, $contents);
