Re: Strange lock/unlock behavior in version 1.2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Strange lock/unlock behavior in version 1.2

Jani Averbach
On 2005-05-25 13:10+0200, Daniel Jedecke wrote:

> Hello,
>
> i played around with version 1.2 of subversion and found a litte bug.
>
> i have a file called "dosomething.pl" with permissions 555  
> ( svn:needs-lock set )
> when i lock the file with "svn lock dosomething.pl" the file have the  
> permission 644.
>
> if i unlock the file. the permissions are set to 444 and the  
> executeable flag won't be set.
>
> Properties on 'dosomething.pl':
>   svn:executable
>   svn:needs-lock
>
> if i make changes an commit the file, its set correctly to 555.
>
> Can anybody confirm that behavior?

Yep, thanks for the report!

#!/bin/sh

rm -rf wc repo

svnadmin create $(pwd)/repo
svn co file://$(pwd)/repo wc
cd wc
touch file.x
ls -l file.x
svn add file.x
svn ps svn:needs-lock '' file.x
svn ps svn:executable '' file.x
svn ci -m ''
ls -l file.x
echo
echo "Next, lock file"
svn lock file.x
ls -l file.x
date >> file.x
svn unlock file.x
ls -l file.x
svn ci -m '' file.x
ls -l file.x
#########################################################

$ sh recipe.sh
Checked out revision 0.
-rw-------  1 jaa jaa 0 May 25 09:26 file.x
A         file.x
property 'svn:needs-lock' set on 'file.x'
property 'svn:executable' set on 'file.x'
Adding         file.x
Transmitting file data .
Committed revision 1.
-r-x------  1 jaa jaa 0 May 25 09:26 file.x

Next, lock file
'file.x' locked by user 'jaa'.
-rw-------  1 jaa jaa 0 May 25 09:26 file.x
'file.x' unlocked.
-r--------  1 jaa jaa 29 May 25 09:26 file.x
Sending        file.x
Transmitting file data .
Committed revision 2.
-r-x------  1 jaa jaa 29 May 25 09:26 file.x

BR, Jani

--
Jani Averbach

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange lock/unlock behavior in version 1.2

Brian W. Fitzpatrick
Jani,

Thanks for the reproduction recipe.  This is a bug in
get_default_file_perms in libsvn_subr/io.c.  I'm working on a fix right
now.

-Fitz

On Wed, 2005-05-25 at 09:28 -0600, Jani Averbach wrote:

> On 2005-05-25 13:10+0200, Daniel Jedecke wrote:
> > Hello,
> >
> > i played around with version 1.2 of subversion and found a litte bug.
> >
> > i have a file called "dosomething.pl" with permissions 555  
> > ( svn:needs-lock set )
> > when i lock the file with "svn lock dosomething.pl" the file have the  
> > permission 644.
> >
> > if i unlock the file. the permissions are set to 444 and the  
> > executeable flag won't be set.
> >
> > Properties on 'dosomething.pl':
> >   svn:executable
> >   svn:needs-lock
> >
> > if i make changes an commit the file, its set correctly to 555.
> >
> > Can anybody confirm that behavior?
>
> Yep, thanks for the report!
>
> #!/bin/sh
>
> rm -rf wc repo
>
> svnadmin create $(pwd)/repo
> svn co file://$(pwd)/repo wc
> cd wc
> touch file.x
> ls -l file.x
> svn add file.x
> svn ps svn:needs-lock '' file.x
> svn ps svn:executable '' file.x
> svn ci -m ''
> ls -l file.x
> echo
> echo "Next, lock file"
> svn lock file.x
> ls -l file.x
> date >> file.x
> svn unlock file.x
> ls -l file.x
> svn ci -m '' file.x
> ls -l file.x
> #########################################################
>
> $ sh recipe.sh
> Checked out revision 0.
> -rw-------  1 jaa jaa 0 May 25 09:26 file.x
> A         file.x
> property 'svn:needs-lock' set on 'file.x'
> property 'svn:executable' set on 'file.x'
> Adding         file.x
> Transmitting file data .
> Committed revision 1.
> -r-x------  1 jaa jaa 0 May 25 09:26 file.x
>
> Next, lock file
> 'file.x' locked by user 'jaa'.
> -rw-------  1 jaa jaa 0 May 25 09:26 file.x
> 'file.x' unlocked.
> -r--------  1 jaa jaa 29 May 25 09:26 file.x
> Sending        file.x
> Transmitting file data .
> Committed revision 2.
> -r-x------  1 jaa jaa 29 May 25 09:26 file.x
>
> BR, Jani
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange lock/unlock behavior in version 1.2

Jani Averbach
On 2005-05-26 16:16-0500, Brian W. Fitzpatrick wrote:
>
> Thanks for the reproduction recipe.  This is a bug in
> get_default_file_perms in libsvn_subr/io.c.  I'm working on a fix
> right now.

Cool!

If you like, I could write a regression test for that during weekend.

BR, Jani

--
Jani Averbach

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange lock/unlock behavior in version 1.2

Brian W. Fitzpatrick

On May 26, 2005, at 9:29 PM, Jani Averbach wrote:

> On 2005-05-26 16:16-0500, Brian W. Fitzpatrick wrote:
>
>>
>> Thanks for the reproduction recipe.  This is a bug in
>> get_default_file_perms in libsvn_subr/io.c.  I'm working on a fix
>> right now.
>>
>
> Cool!
>
> If you like, I could write a regression test for that during weekend.

That would be great.

Thanks,

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange lock/unlock behavior in version 1.2

Brian W. Fitzpatrick-2
In reply to this post by Brian W. Fitzpatrick

On May 26, 2005, at 4:16 PM, Brian W. Fitzpatrick wrote:

> Jani,
>
> Thanks for the reproduction recipe.  This is a bug in
> get_default_file_perms in libsvn_subr/io.c.  I'm working on a fix  
> right
> now.

Fixed in r14859.  Thanks Daniel for the report, and Jani for the  
reproduction case.

-Fitz

> On Wed, 2005-05-25 at 09:28 -0600, Jani Averbach wrote:
>
>> On 2005-05-25 13:10+0200, Daniel Jedecke wrote:
>>
>>> Hello,
>>>
>>> i played around with version 1.2 of subversion and found a litte  
>>> bug.
>>>
>>> i have a file called "dosomething.pl" with permissions 555
>>> ( svn:needs-lock set )
>>> when i lock the file with "svn lock dosomething.pl" the file have  
>>> the
>>> permission 644.
>>>
>>> if i unlock the file. the permissions are set to 444 and the
>>> executeable flag won't be set.
>>>
>>> Properties on 'dosomething.pl':
>>>   svn:executable
>>>   svn:needs-lock
>>>
>>> if i make changes an commit the file, its set correctly to 555.
>>>
>>> Can anybody confirm that behavior?
>>>
>>
>> Yep, thanks for the report!
>>
>> #!/bin/sh
>>
>> rm -rf wc repo
>>
>> svnadmin create $(pwd)/repo
>> svn co file://$(pwd)/repo wc
>> cd wc
>> touch file.x
>> ls -l file.x
>> svn add file.x
>> svn ps svn:needs-lock '' file.x
>> svn ps svn:executable '' file.x
>> svn ci -m ''
>> ls -l file.x
>> echo
>> echo "Next, lock file"
>> svn lock file.x
>> ls -l file.x
>> date >> file.x
>> svn unlock file.x
>> ls -l file.x
>> svn ci -m '' file.x
>> ls -l file.x
>> #########################################################
>>
>> $ sh recipe.sh
>> Checked out revision 0.
>> -rw-------  1 jaa jaa 0 May 25 09:26 file.x
>> A         file.x
>> property 'svn:needs-lock' set on 'file.x'
>> property 'svn:executable' set on 'file.x'
>> Adding         file.x
>> Transmitting file data .
>> Committed revision 1.
>> -r-x------  1 jaa jaa 0 May 25 09:26 file.x
>>
>> Next, lock file
>> 'file.x' locked by user 'jaa'.
>> -rw-------  1 jaa jaa 0 May 25 09:26 file.x
>> 'file.x' unlocked.
>> -r--------  1 jaa jaa 29 May 25 09:26 file.x
>> Sending        file.x
>> Transmitting file data .
>> Committed revision 2.
>> -r-x------  1 jaa jaa 29 May 25 09:26 file.x
>>
>> BR, Jani
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]