You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Michael Pilato" <cm...@red-bean.com> on 2011/09/01 22:43:45 UTC
'svn patch' inconsistency
While documenting 'svn patch' for the book, I noticed something. While 'svn
patch' will automatically schedule a file for deletion when it removes all
that file's lines, it does not offer the same service for properties whose
value it effectively zeroes out. The property remains on the file or
directory, just with an empty value. Is that desired behavior?
--
C. Michael Pilato <cm...@red-bean.com> | http://cmpilato.blogspot.com/
Re: 'svn patch' inconsistency
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 09/01/2011 05:33 PM, Stefan Sperling wrote:
> On Thu, Sep 01, 2011 at 04:43:45PM -0400, C. Michael Pilato wrote:
>> While documenting 'svn patch' for the book, I noticed something. While 'svn
>> patch' will automatically schedule a file for deletion when it removes all
>> that file's lines, it does not offer the same service for properties whose
>> value it effectively zeroes out. The property remains on the file or
>> directory, just with an empty value. Is that desired behavior?
>
> No, this is an oversight.
> Good catch. Please file an issue if you have time, thanks!
> I'll fix it eventually.
Issue #4003.
> For the svnbook I would recommend to just gloss over this omission so
> that the text won't have to change again when the issue has been fixed.
Yeah, I was thinking the same thing.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: 'svn patch' inconsistency
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 09/01/2011 05:33 PM, Stefan Sperling wrote:
> On Thu, Sep 01, 2011 at 04:43:45PM -0400, C. Michael Pilato wrote:
>> While documenting 'svn patch' for the book, I noticed something. While 'svn
>> patch' will automatically schedule a file for deletion when it removes all
>> that file's lines, it does not offer the same service for properties whose
>> value it effectively zeroes out. The property remains on the file or
>> directory, just with an empty value. Is that desired behavior?
>
> No, this is an oversight.
> Good catch. Please file an issue if you have time, thanks!
> I'll fix it eventually.
>
> For the svnbook I would recommend to just gloss over this omission so
> that the text won't have to change again when the issue has been fixed.
Here's another problem.
$ echo "This is a file." > new-file
$ svn add new-file
A new-file
$ svn pset foo bar new-file
property 'foo' set on 'new-file'
$ svn diff
Index: new-file
===================================================================
--- new-file (revision 0)
+++ new-file (working copy)
@@ -0,0 +1 @@
+This is a file.
Property changes on: new-file
___________________________________________________________________
Added: foo
## -0,0 +1 ##
+bar
$ svn diff > PATCH
$ svn patch --reverse-diff PATCH
subversion/svn/patch-cmd.c:91: (apr_err=155010)
subversion/libsvn_subr/sqlite.c:225: (apr_err=155010)
subversion/libsvn_client/patch.c:2897: (apr_err=155010)
subversion/libsvn_client/patch.c:2897: (apr_err=155010)
subversion/libsvn_client/patch.c:2526: (apr_err=155010)
subversion/libsvn_wc/props.c:2472: (apr_err=155010)
subversion/libsvn_wc/props.c:2216: (apr_err=155010)
subversion/libsvn_wc/wc_db.c:6719: (apr_err=155010)
subversion/libsvn_wc/wc_db.c:6663: (apr_err=155010)
subversion/libsvn_wc/wc_db.c:6654: (apr_err=155010)
svn: E155010: The node '/home/cmpilato/tests/wc2/new-file' was not found.
$
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: 'svn patch' inconsistency
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Sep 01, 2011 at 04:43:45PM -0400, C. Michael Pilato wrote:
> While documenting 'svn patch' for the book, I noticed something. While 'svn
> patch' will automatically schedule a file for deletion when it removes all
> that file's lines, it does not offer the same service for properties whose
> value it effectively zeroes out. The property remains on the file or
> directory, just with an empty value. Is that desired behavior?
No, this is an oversight.
Good catch. Please file an issue if you have time, thanks!
I'll fix it eventually.
For the svnbook I would recommend to just gloss over this omission so
that the text won't have to change again when the issue has been fixed.