コード例 #1
0
ファイル: Result.php プロジェクト: google-code-backups/xinc
 public function mergeResultSet(Xinc_Plugin_Repos_ModificationSet_Result $set)
 {
     foreach ($set->getConflictResources() as $res) {
         $key = md5('C' . $res['filename'] . $res['author']);
         if (!in_array($key, $this->_index)) {
             $this->_conflictResources[] = $res;
             $this->_index[] = $key;
         }
     }
     foreach ($set->getUpdatedResources() as $res) {
         $key = md5('U' . $res['filename'] . $res['author']);
         if (!in_array($key, $this->_index)) {
             $this->_updatedResources[] = $res;
             $this->_index[] = $key;
         }
     }
     foreach ($set->getNewResources() as $res) {
         $key = md5('A' . $res['filename'] . $res['author']);
         if (!in_array($key, $this->_index)) {
             $this->_newResources[] = $res;
             $this->_index[] = $key;
         }
     }
     foreach ($set->getMergedResources() as $res) {
         $key = md5('M' . $res['filename'] . $res['author']);
         if (!in_array($key, $this->_index)) {
             $this->_mergedResources[] = $res;
             $this->_index[] = $key;
         }
     }
     foreach ($set->getLogMessages() as $res) {
         $key = md5('LM' . $res['revision'] . $res['date'] . $res['author'] . $res['message']);
         if (!in_array($key, $this->_index)) {
             $this->_logMessages[] = $res;
             $this->_index[] = $key;
         }
     }
 }