You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Rene Rebe <re...@gmx.net> on 2003/08/22 23:47:04 UTC

svn rm empty-dir fails

Hi,

svn rm now-empty-dir

fails with:

Deleting       now-empty-dir
svn: Item is out-of-date.
svn: Commit failed (details follow):
svn:
Item '/now-empty-dir' is out of date.

svn: Your commit message was left in a temporary file:
svn:    '/tmp/scratch/svn-commit.tmp'

### Way to reproduce ###

svn mkdir A
svn mkdir B
svn commit -m "inital dir layout"
touch A/test
svn add A/test
svn commit -m "the initial file"
svn mv A/test B/
svn commit -m "the move breaking some mod-time?"
svn rm A
svn commit -m "fails"

Deleting       A
svn: Item is out-of-date.
svn: Commit failed (details follow):
svn:
Item '/A' is out of date.

svn: Your commit message was left in a temporary file:
svn:    '/tmp/scratch/svn-commit.tmp'

svn, version 0.26.0 (r6550)
   compiled Aug 14 2003, 16:11:59
Linux version 2.4.21-benh2-rock (root@idefix) (gcc version 3.2.3) #1 Mon Aug 4 03:13:17 CEST 2003

The server is Linux, too (but x86). Client FS is ReiserFS (if this
makes a timeing difference ...)

Sincerely yours,
  René Rebe
    - ROCK Linux stable release maintainer

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene.rebe@gmx.net
http://www.rocklinux.org http://www.rocklinux.net/people/rene
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: svn rm empty-dir fails

Posted by Philip Martin <ph...@codematters.co.uk>.
Rene Rebe <re...@gmx.net> writes:

>     Philip Martin <ph...@codematters.co.uk> wrote:
>
>> Rene Rebe <re...@gmx.net> writes:
>> 
>> > svn mv A/test B/
>> > svn commit -m "the move breaking some mod-time?"
>> 
>> This commit creates a new revision of A in the repository, and makes A
>> out-of-date in your working copy.
>
> Why does it need to make A out-of-date?

That question was answered below.

> It was HEAD before - and should so after the commit, shouldn't it?

In general the working copy is not HEAD, it certainly wasn't in your
case as you had committed an add in A and had not run update.

[...]

>> - One may commit an add in an out-of-date directory provided the item
>>   added does not conflict with an item in the HEAD version of the
>>   directory.
>> 
>> - One may commit a delete of an item from an out-of-date directory
>>   provided the item being deleted is up-to-date.
>
> Couldn't the same "provided the item deleted does not conflict with an
> item in the HEAD version of the directory" apply, as it does for adds
> above?

The general principle we used was that 'svn commit' should not delete
information that was not present in the working copy.

>> - Neither of the above cause the working copy directory to get
>>   updated.  To do otherwise would require commits to be able to add,
>>   and delete, items in the working copy.
>
> Sure.

That is the answer to your first question.

>> - One cannot commit a delete of an out-of-date directory.  To do so
>>   would allow one to delete items one did not know existed.
>
> The questions are: Does the directory really need to be out-of-date in
> this case?

The general principle about deleting information applies.

> And can't the same "no conflict rule" as for adds seems to apply be
> used here?

The rule for adds is simple, one cannot add an item "foo" if an item
called "foo" already exists.  It would be more complicated for
deletes, it would involve comparing two revisions of "foo" and making
some sort of decision about whether they are "the same".

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn rm empty-dir fails

Posted by Rene Rebe <re...@gmx.net>.
Hi,

On: Sat, 23 Aug 2003 01:29:20 +0100,
    Philip Martin <ph...@codematters.co.uk> wrote:

> Rene Rebe <re...@gmx.net> writes:
> 
> > svn mv A/test B/
> > svn commit -m "the move breaking some mod-time?"
> 
> This commit creates a new revision of A in the repository, and makes A
> out-of-date in your working copy.

Why does it need to make A out-of-date? It was HEAD before - and
should so after the commit, shouldn't it?

> Lo and behold!  Your working copy A is out-of-date.  Run 'svn up' and
> try again.

Yes - a svn up fixed this (this happend in a real worl repository -
this scratch stuff was just an example to reproduce ...)

> The rules are
> 
> - One may commit an add in an out-of-date directory provided the item
>   added does not conflict with an item in the HEAD version of the
>   directory.
> 
> - One may commit a delete of an item from an out-of-date directory
>   provided the item being deleted is up-to-date.

Couldn't the same "provided the item deleted does not conflict with an
item in the HEAD version of the directory" apply, as it does for adds
above?

> - Neither of the above cause the working copy directory to get
>   updated.  To do otherwise would require commits to be able to add,
>   and delete, items in the working copy.

Sure.

> - One cannot commit a delete of an out-of-date directory.  To do so
>   would allow one to delete items one did not know existed.

The questions are: Does the directory really need to be out-of-date in
this case? And can't the same "no conflict rule" as for adds seems to
apply be used here?

> - One cannot commit a property modification to an out-of-date
>   directory.  To do so would allow one to overwrite properties one has
>   not seen.
> 
> Is this in the book?  It should be.

Sincerely yours,
  René Rebe
    - ROCK Linux stable release maintainer

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene.rebe@gmx.net
http://www.rocklinux.org http://www.rocklinux.net/people/rene
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: svn rm empty-dir fails

Posted by Philip Martin <ph...@codematters.co.uk>.
Rene Rebe <re...@gmx.net> writes:

> svn mv A/test B/
> svn commit -m "the move breaking some mod-time?"

This commit creates a new revision of A in the repository, and makes A
out-of-date in your working copy.

> svn rm A
> svn commit -m "fails"
> Deleting       A
> svn: Item is out-of-date.
> svn: Commit failed (details follow):
> svn: Item '/A' is out of date.
> svn: Your commit message was left in a temporary file:
> svn:    '/tmp/scratch/svn-commit.tmp'

Lo and behold!  Your working copy A is out-of-date.  Run 'svn up' and
try again.

The rules are

- One may commit an add in an out-of-date directory provided the item
  added does not conflict with an item in the HEAD version of the
  directory.

- One may commit a delete of an item from an out-of-date directory
  provided the item being deleted is up-to-date.

- Neither of the above cause the working copy directory to get
  updated.  To do otherwise would require commits to be able to add,
  and delete, items in the working copy.

- One cannot commit a delete of an out-of-date directory.  To do so
  would allow one to delete items one did not know existed.

- One cannot commit a property modification to an out-of-date
  directory.  To do so would allow one to overwrite properties one has
  not seen.

Is this in the book?  It should be.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org