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

Mysterious "Transaction is out of date" error

From: Gareth McCaughan <Gareth.McCaughan_at_pobox.com>
Date: 2002-08-03 04:26:27 CEST

Consider the following shell script:

    #!/usr/local/bin/bash -v
    BASE=<some directory or other>
    R=$BASE/svn-r
    W=$BASE/svn-w
    rm -rf $R $W
    svnadmin create $R
    mkdir $W
    cd $W
    mkdir project
    svn import -m 'initial import' file://$R project project
    svn co file://$R/project project
    cd project
    mkdir a
    svn add a
    touch a/b
    svn add a/b
    svn commit -m 'add stuff'
    echo zog >> a/b
    svn commit -m 'extend a/b'
    svn cp a c
    svn commit -m 'duplicate directory'

The final commit fails, thus:

    Adding c
    Adding c/b

    subversion/libsvn_client/commit.c:662
    svn_error: #21087 : <Transaction is out of date>
      Commit failed (details follow):

    subversion/libsvn_ra_local/commit_editor.c:112
    svn_error: #21087 : <Transaction is out of date>
      out of date: `/project/c/b' in txn `4'

This puzzles me. Doesn't "Transaction is out of date"
generally mean that someone or something else has changed
the repository? That certainly hasn't happened here.
So, um, what *is* going on?

Perhaps this is a misunderstanding on my part, but it
certainly looks like a bug to me. So, some further
investigation ...

First of all: I'm running revision 2836 of Subversion,
built in maintainer mode, without server support, on
FreeBSD 4.6-STABLE.

In that final commit, "c" gets added happily. Then
Subversion goes to add "c/b". In "add_file" in "commit_editor.c",
there's a check that the path of the newly added file doesn't
already exist; if it does, the "Transaction out of date" error
is produced. This check fails: the path *does* exist.

Removing the "echo zog" line and the following commit makes
the error go away: Subversion never does an add_file on
"c/b".

I'm guessing that when "c" gets added, what's added includes
the directory entries for its children, which is why "c/b" is
already there when Subversion goes to add it. But I don't
understand why removing the modification to "a/b" before
the copy makes a difference.

-- 
g
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Aug 3 04:27:02 2002

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.