Removing a needs-lock file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Removing a needs-lock file

D.J. Heap
Should 'svn rm' require the user to lock the file if it has
svn:needs-lock set?

It kind of seems like it should -- but an 'svn rm' command is not quite
the same as discouraging an external program from modifying/deleting the
file so I'm not sure what the intended behavior is.

DJ

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Removing a needs-lock file

Brian W. Fitzpatrick

On Apr 26, 2005, at 9:50 PM, D.J. Heap wrote:

> Should 'svn rm' require the user to lock the file if it has
> svn:needs-lock set?
>
> It kind of seems like it should -- but an 'svn rm' command is not
> quite the same as discouraging an external program from
> modifying/deleting the file so I'm not sure what the intended behavior
> is.

Well, to enforce that would require a somewhat different line of coding
than we've currently been using...

In any case, I think it's OK that 'svn rm' can delete a file if
svn:needs-lock is set.  The purpose of svn:needs-lock is to act in an
advisory capacity so as to prevent more than one person from making
changes to an unmergable file: Your editor should notice that the file
is read-only and notify you of this (then you can 'svn lock' the file
and go about your business).

If you 'svn rm' a file with svn:needs-lock and another user actually
has a lock on the file, your commit will fail.  If you 'svn rm' a file
and no one else has a lock on the file, the nothing's lost.

-Fitz


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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Removing a needs-lock file

D.J. Heap
Brian W. Fitzpatrick wrote:
[snip]

>
> Well, to enforce that would require a somewhat different line of coding
> than we've currently been using...
>
> In any case, I think it's OK that 'svn rm' can delete a file if
> svn:needs-lock is set.  The purpose of svn:needs-lock is to act in an
> advisory capacity so as to prevent more than one person from making
> changes to an unmergable file: Your editor should notice that the file
> is read-only and notify you of this (then you can 'svn lock' the file
> and go about your business).
>
> If you 'svn rm' a file with svn:needs-lock and another user actually has
> a lock on the file, your commit will fail.  If you 'svn rm' a file and
> no one else has a lock on the file, the nothing's lost.
>
> -Fitz

Yes, I can accept that.

Thanks,

DJ

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

Loading...