浏览代码

Finished cleanup of debug messages.

matt-whittom 12 年之前
父节点
当前提交
a5df2851ef

+ 0 - 1
src/Composer/Downloader/PerforceDownloader.php

@@ -27,7 +27,6 @@ class PerforceDownloader extends VcsDownloader
     {
     {
         $ref = $package->getSourceReference();
         $ref = $package->getSourceReference();
         $label = $package->getPrettyVersion();
         $label = $package->getPrettyVersion();
-        print ("PerforceDownloader: doDownload: ref:$ref, label:$label\n");
 
 
         $perforce = new Perforce("", "", $package->getSourceUrl(), $path);
         $perforce = new Perforce("", "", $package->getSourceUrl(), $path);
         $perforce->setStream($ref);
         $perforce->setStream($ref);

+ 0 - 9
src/Composer/Repository/Vcs/PerforceDriver.php

@@ -33,7 +33,6 @@ class PerforceDriver extends VcsDriver
      */
      */
     public function initialize()
     public function initialize()
     {
     {
-        print ("PerforceDriver:initialize\n");
         $this->depot = $this->repoConfig['depot'];
         $this->depot = $this->repoConfig['depot'];
         $this->branch = "";
         $this->branch = "";
         if (isset($this->repoConfig['branch'])){
         if (isset($this->repoConfig['branch'])){
@@ -60,7 +59,6 @@ class PerforceDriver extends VcsDriver
      */
      */
     public function getComposerInformation($identifier)
     public function getComposerInformation($identifier)
     {
     {
-        print("\nPerforceDriver:getComposerInformation - identifier: $identifier\n");
         $composer_info =$this->perforce->getComposerInformation($identifier);
         $composer_info =$this->perforce->getComposerInformation($identifier);
         return $composer_info;
         return $composer_info;
     }
     }
@@ -70,7 +68,6 @@ class PerforceDriver extends VcsDriver
      */
      */
     public function getRootIdentifier()
     public function getRootIdentifier()
     {
     {
-        print ("PerforceDriver:getRootIdentifier\n");
         return $this->branch;
         return $this->branch;
     }
     }
 
 
@@ -79,7 +76,6 @@ class PerforceDriver extends VcsDriver
      */
      */
     public function getBranches()
     public function getBranches()
     {
     {
-        print ("PerforceDriver:getBranches\n");
         $branches = $this->perforce->getBranches();
         $branches = $this->perforce->getBranches();
         return $branches;
         return $branches;
     }
     }
@@ -89,7 +85,6 @@ class PerforceDriver extends VcsDriver
      */
      */
     public function getTags()
     public function getTags()
     {
     {
-        print ("PerforceDriver:getTags\n");
         $tags = $this->perforce->getTags();
         $tags = $this->perforce->getTags();
         return $tags;
         return $tags;
     }
     }
@@ -120,7 +115,6 @@ class PerforceDriver extends VcsDriver
      */
      */
     public function getUrl()
     public function getUrl()
     {
     {
-        print ("PerforceDriver:getUrl\n");
         return $this->url;
         return $this->url;
     }
     }
 
 
@@ -129,9 +123,7 @@ class PerforceDriver extends VcsDriver
      */
      */
     public function hasComposerFile($identifier)
     public function hasComposerFile($identifier)
     {
     {
-        print ("PerforceDriver:hasComposerFile - identifier: $identifier\n");
         $composerFile = $this->perforce->getComposerFilePath($identifier);
         $composerFile = $this->perforce->getComposerFilePath($identifier);
-        print ("composerFile: $composerFile\n");
         if (!file_exists(filename)){
         if (!file_exists(filename)){
             $composer_info = $this->perforce->getComposerInformation();
             $composer_info = $this->perforce->getComposerInformation();
             $result = strlen(trim($composer_info))>0;
             $result = strlen(trim($composer_info))>0;
@@ -154,7 +146,6 @@ class PerforceDriver extends VcsDriver
      */
      */
     public static function supports(IOInterface $io, $url, $deep = false)
     public static function supports(IOInterface $io, $url, $deep = false)
     {
     {
-        print ("PerforceDriver:supports - url: $url\n");
         return Perforce::checkServerExists($url);
         return Perforce::checkServerExists($url);
     }
     }
 }
 }

+ 0 - 10
src/Composer/Util/Perforce.php

@@ -135,7 +135,6 @@ class Perforce {
 
 
     public function syncCodeBase($label){
     public function syncCodeBase($label){
         $p4CreateClientCommand = $this->generateP4Command( "client -i < " . $this->getP4ClientSpec());
         $p4CreateClientCommand = $this->generateP4Command( "client -i < " . $this->getP4ClientSpec());
-        print ("Perforce: syncCodeBase - client command:$p4CreateClientCommand \n");
         $result = shell_exec($p4CreateClientCommand);
         $result = shell_exec($p4CreateClientCommand);
 
 
         $prevDir = getcwd();
         $prevDir = getcwd();
@@ -149,14 +148,12 @@ class Perforce {
                 $p4SyncCommand = $p4SyncCommand . "@" . $label;
                 $p4SyncCommand = $p4SyncCommand . "@" . $label;
             }
             }
         }
         }
-        print ("Perforce: syncCodeBase - sync command:$p4SyncCommand \n");
         $result = shell_exec($p4SyncCommand);
         $result = shell_exec($p4SyncCommand);
 
 
         chdir($prevDir);
         chdir($prevDir);
     }
     }
 
 
     public function writeP4ClientSpec(){
     public function writeP4ClientSpec(){
-        print ("Perforce: writeP4ClientSpec\n");
         $spec = fopen($this->getP4ClientSpec(), 'w');
         $spec = fopen($this->getP4ClientSpec(), 'w');
         try {
         try {
             fwrite($spec, "Client: " . $this->getClient() . "\n\n");
             fwrite($spec, "Client: " . $this->getClient() . "\n\n");
@@ -193,7 +190,6 @@ class Perforce {
     }
     }
 
 
     public function p4Login(IOInterface $io){
     public function p4Login(IOInterface $io){
-        print ("Perforce: P4Login\n");
         $this->queryP4User($io);
         $this->queryP4User($io);
         if (!$this->isLoggedIn()){
         if (!$this->isLoggedIn()){
             $password = $this->queryP4Password($io);
             $password = $this->queryP4Password($io);
@@ -204,7 +200,6 @@ class Perforce {
 
 
     public static function checkServerExists($url)
     public static function checkServerExists($url)
     {
     {
-        print ("Perforce: checkServerExists\n");
         $result = shell_exec("p4 -p $url info -s");
         $result = shell_exec("p4 -p $url info -s");
         $index = strpos($result, "error");
         $index = strpos($result, "error");
         if ($index === false){
         if ($index === false){
@@ -226,7 +221,6 @@ class Perforce {
     public function getComposerInformationFromPath($composer_json)
     public function getComposerInformationFromPath($composer_json)
     {
     {
         $command = $this->generateP4Command(" print $composer_json", false);
         $command = $this->generateP4Command(" print $composer_json", false);
-        print ("Perforce: getComposerInformation: command: $command\n");
         $result = shell_exec($command);
         $result = shell_exec($command);
         $index = strpos($result, "{");
         $index = strpos($result, "{");
         if ($index === false){
         if ($index === false){
@@ -244,9 +238,7 @@ class Perforce {
     {
     {
         $composer_json_path = substr($identifier, 0, $index) . "/composer.json" . substr($identifier, $index);
         $composer_json_path = substr($identifier, 0, $index) . "/composer.json" . substr($identifier, $index);
         $command = $this->generateP4Command(" files $composer_json_path", false);
         $command = $this->generateP4Command(" files $composer_json_path", false);
-        print("Perforce: getComposerInformationFromTag: $identifier, command:\n $command\n");
         $result = shell_exec($command);
         $result = shell_exec($command);
-        print("Perforce: getComposerInformationFromTag: result: \n $result\n");
         $index2 = strpos($result, "no such file(s).");
         $index2 = strpos($result, "no such file(s).");
         if ($index2 === false){
         if ($index2 === false){
             $index3 = strpos($result, "change");
             $index3 = strpos($result, "change");
@@ -280,7 +272,6 @@ class Perforce {
         }
         }
         $branches = array();
         $branches = array();
         $branches['master'] = $possible_branches[$this->p4branch];
         $branches['master'] = $possible_branches[$this->p4branch];
-        print ("Perforce: getBranches: returning: \n" . var_export($branches, true) . "\n");
         return $branches;
         return $branches;
     }
     }
 
 
@@ -289,7 +280,6 @@ class Perforce {
         $command = $this->generateP4Command("labels");
         $command = $this->generateP4Command("labels");
         $result = shell_exec($command);
         $result = shell_exec($command);
         $resArray = explode("\n", $result);
         $resArray = explode("\n", $result);
-        print("Perforce:getTags - result:\n$result\n");
         $tags = array();
         $tags = array();
         foreach ($resArray as $line){
         foreach ($resArray as $line){
             $index = strpos($line, "Label");
             $index = strpos($line, "Label");