[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: prop ops on schedule-delete

From: Ed Price <ed.price_at_gmail.com>
Date: 2006-03-12 23:19:20 CET

> I think pg should work, but ps and pedit should not (unless --force
> is passed) since the object has been scheduled to not exist "soon".
> But I can see how others might prefer different behavior(s). I'm
> really not sure there's one Right Answer here.

So you think they should be inconsistent but in the opposite way they
are inconsistent now. Interesting :) Actually, I can see where you're
coming from, I think... There is no value is changing the properties
of a to-be-deleted file (AFAICS) but there *is* value in querying
properties it had prior to deletion.

I just tested to make sure, and propget still silently returns the
wrong answer even when the file had a property before it was scheduled
for deletion:

 $ svnadmin create repos
 $ svn co file://`pwd`/repos wc
 Checked out revision 0.
 $ cd wc
 $ touch foo
 $ svn add foo
 A foo
 $ svn ps p 1 foo
 property 'p' set on 'foo'
 $ svn ci -m ""
 Adding foo
 Transmitting file data .
 Committed revision 1.
 $ svn up
 At revision 1.
 $ svn pg p foo
 1
 $ svn rm foo
 D foo
 $ svn pg p foo
 $

Hmm. I think you've changed my mind. I would now propose:

 * propget and proplist should Just Work on schedule-delete

 * propset and propedit should return a warning that the file is
   scheduled for deletion.

Should I file this as an issue?

Thanks!
-Ed

PS

> The errors above, "is not under version control" seem definitely
> wrong, though. They should say "is scheduled for deletion", if
> anything.

I think you misread the output. There was no error message for any of
the ops on schedule-delete file. But one of the ops silently returned
the wrong answer.

  $ svnadmin create repos
  $ svn co file://`pwd`/repos wc
  Checked out revision 0.
  $ cd wc
  $ touch foo
  $ svn add foo
  A foo
  $ svn ci -m ""
  Adding foo
  Transmitting file data .
  Committed revision 1.
  $ svn rm foo
  D foo
  $ svn ps p 1 foo
  property 'p' set on 'foo'
  $ svn pl foo
  Properties on 'foo':
    p
  $ svn pg p foo
  $ # huh?

^^^^^^ That's the bug (pg should either fail or return the right
answer).

vvvvvv The below is just for comparison, that you can't do any of the
prop ops on not-at-all-existent (ie not even shedule-delete), or just
unversioned files:

  $ svn st
  D foo
  $ svn ps p 1 does_not_exist
  svn: warning: 'does_not_exist' is not under version control
  $ svn pg p does_not_exist
  subversion/libsvn_client/prop_commands.c:579: (apr_err=200005)
  svn: 'does_not_exist' is not under version control
  $ svn pl does_not_exist
  svn: warning: 'does_not_exist' is not under version control
  $ touch not_versioned
  $ svn ps p 1 not_versioned
  svn: warning: 'not_versioned' is not under version control
  $ svn pl not_versioned
  svn: warning: 'not_versioned' is not under version control
  $ svn pg p not_versioned
  subversion/libsvn_client/prop_commands.c:579: (apr_err=200005)
  svn: 'not_versioned' is not under version control
  $

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 12 23:19:44 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.