php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59530 svn_mkdir assumes URL and always returns FALSE
Submitted: 2010-12-06 10:41 UTC Modified: 2011-05-31 22:37 UTC
From: dan at velsoft dot com Assigned:
Status: Closed Package: svn (PECL)
PHP Version: 5.3.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dan at velsoft dot com
New email:
PHP Version: OS:

 

 [2010-12-06 10:41 UTC] dan at velsoft dot com
Description:
------------
svn_mkdir should return TRUE on successful creation of 
directory, or FALSE otherwise.

However, svn_mkdir assumes that the mkdir will be done on a 
URL as opposed to a working copy. The "info" struct 
(svn_commit_info_t **) does not get set if the mkdir is done 
on a working copy, as it does not commit the changes 
immediately, but rather adds the changes to be commited (via. 
svn_client_add in the SVN client lib)

The patch below resolves the issue of not returning a 
boolean, but another patch might be required in the case of 
committing to a URL.

Reproduce code:
---------------
if(!svn_mkdir("/some/working/copy/path"))
{
	echo "Could not create directory";
}


Patch to remove assumption of commit and URL instead of working copy at http://pastebin.ca/2011999

Expected result:
----------------
FALSE if the directory exists, or the mkdir fails for another 
reason. TRUE if the directory is successfully created.

Actual result:
--------------
svn_mkdir always returns FALSE if the svn_mkdir is on a 
working copy directory.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-06 22:58 UTC] alan at akbkhome dot com
Can you test this. - it makes the message optional, rather 
than removing it.

http://svn.php.net/viewvc/pecl/svn/trunk/svn.c?
r1=306042&r2=306041&pathrev=306042&view=patch
 [2010-12-07 08:30 UTC] dan at velsoft dot com
The latest change to the svn_mkdir seems to return the proper 
value for a mkdir on a local copy, and acts the same way as 
Subversion acts if there is a log message on a working 
directory mkdir.
 [2011-05-31 22:37 UTC] alan at akbkhome dot com
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC