protected function GetWorkingDirectory($strCheckoutCommand = null)
 {
     if ($this->txtRepository->Text == '') {
         throw new Exception('You have to enter a path to a svn repository');
     }
     $this->objProject->SetPreferenceValueByName('SVN repository for source texts', $this->txtRepository->Text);
     $this->objProject->Save();
     return parent::GetWorkingDirectory(self::CHECKOUT_COMMAND);
 }
 protected function GetWorkingDirectory($strCheckoutCommand = null)
 {
     if ($this->txtRepository->Text == '') {
         throw new Exception('You have to enter a path to a Mercurial repository');
     }
     $ch = curl_init(sprintf('%s/summary', $this->txtRepository->Text));
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $data = curl_exec($ch);
     curl_close($ch);
     if (!$data) {
         throw new Exception('This does not look like a valid Mercurial repository');
     }
     $this->objProject->SetPreferenceValueByName('Mercurial repository for source texts', $this->txtRepository->Text);
     $this->objProject->Save();
     return parent::GetWorkingDirectory(self::CHECKOUT_COMMAND);
 }