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

Bug with deleted and copied directory

From: Michael Abbott <michael_at_araneidae.co.uk>
Date: Tue, 21 Oct 2008 06:11:31 +0000 (GMT)

I think the message below, originally sent to users@, belongs on this
list. I've had one confirmation from somebody else who's also been
bitten, but no indication that it's a known problem with subversion.

---------- Forwarded message ----------
Date: Thu, 16 Oct 2008 12:50:29 +0000 (GMT)
From: Michael Abbott <michael_at_araneidae.co.uk>
To: users_at_subversion.tigris.org
Subject: Bug with deleted and copied directory

I've been trying to see if this is a known bug, but I haven't managed to
find anything terribly relevant. In brief, if I `svn rm` a subdirectory
and then `svn cp` the containing directory, svn becomes rather confused
when I come to commit the result.

I'm running a moderately old version of svn:

$ svn --version | head -n2
svn, version 1.4.2 (r22196)
   compiled Nov 5 2006, 13:12:27

The problem that's triggered this message is the following report from a
recent commit (path name simplified and abbreviated for convenience, but
see end of message for original for reference):

svn: Commit succeeded, but other errors follow:
svn: Error bumping revisions post-commit (details follow):
svn: Directory '/tmp/repo/release/1-18/subdir' is missing

The commit that generated this message was generated by the following
sequence (again somewhat caricatured and hugely simplified -- this is
part of a large automatic process):

        svn checkout -N $REPOSITORY /tmp/repo
        svn update /tmp/repo/trunk
        svn update -N /tmp/repo/release
        svn rm /tmp/repo/trunk/subdir
        svn cp /tmp/repo/trunk /tmp/repo/release/1-18
        svn commit -m "$COMMIT_MESSAGE" /tmp/repo

I'm pretty sure the problem arises from the `svn rm ...; svn cp ...`
sequence. The following simpler sequence demonstrates that something
isn't right here, but doesn't reproduce the message:

$ find -name .svn -prune -o -name . -o -print
./b
./a
./a/a
./a/a/a
./a/a/a/x
./a/y
$ svn status
$ svn rm a/a
D a/a/a/x
D a/a/a
D a/a
$ svn cp a b/a
A b/a
$ svn status
D a/a
D a/a/a
D a/a/a/x
A + b/a
D + b/a/a
D + b/a/a/a
D + b/a/a/a/x
$ svn commit -m testing
Deleting a/a
Adding b/a
Deleting b/a/a
Adding b/a/y

Committed revision 828.
$

I'm sure it isn't right that the a/a subdirectory is added to b and then
promptly deleted again! I've certainly met other problems in this area in
the past, and normally take care not to nest directory modifications like
this.

I can see that the workaround is to ensure that a commit always intervenes
between changing the directory structure and any further modifications.
My question is this: is this a known (hopefully fixed?) problem?

P.S. For reference, the true directory name in the original error message
is: /tmp/publish-prod.W11524/release/ioc/BR01C/DI/1-18/BR01C-DI-IOC-02App
I'm sure this makes no real difference...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-21 08:44:16 CEST

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