You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alan Wood <Al...@clear.net.nz> on 2009/05/08 09:46:42 UTC
bug in svn_client_copy wc to url
Hi All,
Just been trying to write tests for the first time ( in subversion that is ).
In the process I came across a seg fault when doing a svn copy wc to url.
There seems to be no check to see if a wc file exists before libsvn_client\copy.c line
1096 where it crashes on entry == NULL
SVN_ERR(svn_wc_entry(&entry, pair->src, adm_access,
FALSE, iterpool));
pair->src_revnum = entry->revision;
To match the wc to wc case it looks like there should be a file
exist check near the beginning of wc_to_repos_copy() perhaps in the
loop that creates the absolute paths
This has been checked with trunk and also with version 1.6.0
To reproduce:
svn cp not_a_file svn://server/repo/filename -m "log msg"
Tests done on windows.
Cheers
Alan Wood
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2108998
Re: bug in svn_client_copy wc to url
Posted by Senthil Kumaran S <se...@collab.net>.
Stefan Sperling wrote:
>> In both the cases 1.5.x works correctly,
>
> No it doesn't:
>
> stsp@jack [/tmp/svn-sandbox/trunk] $ svn cp not_a_file svn://localhost/tmp/svn-sandbox/repos/
> Segmentation fault (core dumped)
> stsp@jack [/tmp/svn-sandbox/trunk] $
>
> We may want to fix this in a 1.5.x point release as well.
Oh yes, I was checking it with a wc created by trunk svn, hence the confusion.
I agree it does not work with 1.5.x too.
--
Senthil Kumaran S
http://www.stylesen.org/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2110650
Re: bug in svn_client_copy wc to url
Posted by Stefan Sperling <st...@elego.de>.
On Fri, May 08, 2009 at 04:37:29PM +0530, Senthil Kumaran S wrote:
> Alan Wood wrote:
> >>> Yes this is a bug. Alan, are planning to come up with a patch for the same?
> >> FWIW, this does not reproduce with 1.5.1:
> >>
> >> $ svn cp not_a_file svn:///tmp/svn-sandbox/repos/
> >> svn: '.' is not a working copy
> >> svn: Can't open file '.svn/entries': No such file or directory
> >> $ svn --version
> >> svn, version 1.5.1 (r32289)
> >>
> >> (No, I have no dev build at the moment...)
> >>
> >> Stefan
> >
> > Sorry not to mention that the current directory is a working copy of the destination
> > repository.
Indeed, thanks.
> In both the cases 1.5.x works correctly,
No it doesn't:
stsp@jack [/tmp/svn-sandbox/trunk] $ svn cp not_a_file svn://localhost/tmp/svn-sandbox/repos/
Segmentation fault (core dumped)
stsp@jack [/tmp/svn-sandbox/trunk] $
We may want to fix this in a 1.5.x point release as well.
Stefan
Re: bug in svn_client_copy wc to url
Posted by Senthil Kumaran S <se...@collab.net>.
Alan Wood wrote:
>>> Yes this is a bug. Alan, are planning to come up with a patch for the same?
>> FWIW, this does not reproduce with 1.5.1:
>>
>> $ svn cp not_a_file svn:///tmp/svn-sandbox/repos/
>> svn: '.' is not a working copy
>> svn: Can't open file '.svn/entries': No such file or directory
>> $ svn --version
>> svn, version 1.5.1 (r32289)
>>
>> (No, I have no dev build at the moment...)
>>
>> Stefan
>
> Sorry not to mention that the current directory is a working copy of the destination
> repository.
In both the cases 1.5.x works correctly,
<snip>
$ svn --version
svn, version 1.5.7 (dev build)
$ svn cp somefile file:///tmp/repos/filename -m "log msg"
svn: '.' is not a working copy
svn: Can't open file '.svn/entries': No such file or directory
$ pwd
/tmp
$ svn cp somefile file:///tmp/repos/filename -m "log msg"
svn: '.' is not a working copy
svn: Can't open file '.svn/entries': No such file or directory
$ pwd
/tmp/wc
</snip>
--
Senthil Kumaran S
http://www.stylesen.org/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2110094
Re: bug in svn_client_copy wc to url
Posted by Alan Wood <Al...@clear.net.nz>.
> > Yes this is a bug. Alan, are planning to come up with a patch for the same?
>
> FWIW, this does not reproduce with 1.5.1:
>
> $ svn cp not_a_file svn:///tmp/svn-sandbox/repos/
> svn: '.' is not a working copy
> svn: Can't open file '.svn/entries': No such file or directory
> $ svn --version
> svn, version 1.5.1 (r32289)
>
> (No, I have no dev build at the moment...)
>
> Stefan
Sorry not to mention that the current directory is a working copy of the destination
repository.
Alan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2109938
Re: bug in svn_client_copy wc to url
Posted by Stefan Sperling <st...@elego.de>.
On Fri, May 08, 2009 at 03:40:31PM +0530, Senthil Kumaran S wrote:
> Alan Wood wrote:
> > Hi All,
> > Just been trying to write tests for the first time ( in subversion that is ).
> > In the process I came across a seg fault when doing a svn copy wc to url.
> >
> > There seems to be no check to see if a wc file exists before libsvn_client\copy.c line
> > 1096 where it crashes on entry == NULL
> >
> > SVN_ERR(svn_wc_entry(&entry, pair->src, adm_access,
> > FALSE, iterpool));
> > pair->src_revnum = entry->revision;
>
> Yes this is a bug. Alan, are planning to come up with a patch for the same?
FWIW, this does not reproduce with 1.5.1:
$ svn cp not_a_file svn:///tmp/svn-sandbox/repos/
svn: '.' is not a working copy
svn: Can't open file '.svn/entries': No such file or directory
$ svn --version
svn, version 1.5.1 (r32289)
(No, I have no dev build at the moment...)
Stefan
Re: bug in svn_client_copy wc to url
Posted by Senthil Kumaran S <se...@collab.net>.
Alan Wood wrote:
> Could do it but would like to get tests done for my blame patch to push that through
> first. So someone else should be able to get there first it doesn't look too hard.
Fix committed in r37646.
Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2111669
Re: bug in svn_client_copy wc to url
Posted by Alan Wood <Al...@clear.net.nz>.
On 8 May 2009 at 15:40, Senthil Kumaran S wrote:
> Alan Wood wrote:
> > Hi All,
> > Just been trying to write tests for the first time ( in subversion that is ).
> > In the process I came across a seg fault when doing a svn copy wc to url.
> >
> > There seems to be no check to see if a wc file exists before libsvn_client\copy.c line
> > 1096 where it crashes on entry == NULL
> >
> > SVN_ERR(svn_wc_entry(&entry, pair->src, adm_access,
> > FALSE, iterpool));
> > pair->src_revnum = entry->revision;
>
> Yes this is a bug. Alan, are planning to come up with a patch for the same?
Could do it but would like to get tests done for my blame patch to push that through
first. So someone else should be able to get there first it doesn't look too hard.
> Thank You.
> --
> Senthil Kumaran S
> http://www.stylesen.org/
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2109201
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2109979
Re: bug in svn_client_copy wc to url
Posted by Senthil Kumaran S <se...@collab.net>.
Alan Wood wrote:
> Hi All,
> Just been trying to write tests for the first time ( in subversion that is ).
> In the process I came across a seg fault when doing a svn copy wc to url.
>
> There seems to be no check to see if a wc file exists before libsvn_client\copy.c line
> 1096 where it crashes on entry == NULL
>
> SVN_ERR(svn_wc_entry(&entry, pair->src, adm_access,
> FALSE, iterpool));
> pair->src_revnum = entry->revision;
Yes this is a bug. Alan, are planning to come up with a patch for the same?
Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2109201