php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57883 When using svn_import php give a boolean true back. But nothing happens.
Submitted: 2007-10-22 06:55 UTC Modified: 2011-10-05 21:09 UTC
From: ruud at t-boonproductions dot nl Assigned:
Status: No Feedback Package: svn (PECL)
PHP Version: 5.2.4 OS: FreeBSD
Private report: No CVE-ID: None
 [2007-10-22 06:55 UTC] ruud at t-boonproductions dot nl
Description:
------------
When using svn_import php give a boolean true back. But nothing changed in the repository. When I enter the command as the same user (svn import import_dir repository_url) it works fine.

Reproduce code:
---------------
public function __construct($p_sModuleUrl, $p_sTemplateDir){
		parent::__construct($p_sModuleUrl, $p_sTemplateDir);
		$oAuth= new clsAuthenticate();
		$this->_aUser = $oAuth->getArray();
		svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, $this->_aUser["svn_user"]);
		svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, $this->_aUser["svn_pass"]);
		$this->_sLocalPath = realpath('/usr/local/www/dev/'.$this->_aUser["svn_user"].'/common/');
		$this->_sRepository = "file:///usr/local/svn/repository/insite";
		$this->_sDirStructure = realpath('/usr/local/svn/project_layout');
	}
	
	public function getAjaxAddsvn(){
		$oProject = new doProjects();
		$oInput = clsInput::singleton();
		$nProject = $oInput->get('project');
		$oProject->loadById($nProject);
		if (svn_import('/usr/local/www/dev/ruud/maximaal', $this->_sRepository."/test123", false)){
			return $this->getMessage("Subversion project created");
		}else{
			return $this->getMessage("Subversion project creation FAILED!");
		}
	}

Expected result:
----------------
Directory added to the repository.

Actual result:
--------------
boolean true. Nothing changed in repository.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-22 12:33 UTC] ruud at t-boonproductions dot nl
Today i've tryed some other things.
And got some extra info on the problem/bug.
Os : Freebsd 6.2
PHP : 5.2.4
SVN client version : 1.4.4

Compiled the latest version from the CVS. (Needed to make a symbolic link from /usr/local/include/apr-1/ to apr-1.0 to work) And use the following code :

Reproduce code:
---------------
<?php
$user = "test";
$pass = "test";
$repos = "http://test/svn/testrepo";
$dir = realpath("/usr/local/test/test_layout");

svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, $user);
svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD,
$pass);

print_r(svn_ls($repos)); // works fine

echo svn_import($dir, $repos, false); //returns true nothing happens
?>
When i try cmd line svn import it works fine.
Also remote using eclipse it works ok.
 [2008-01-29 22:18 UTC] alan at akbkhome dot com
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PECL.


can you try debugging / and suggesting a patch.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 00:01:26 2024 UTC