You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Abbott <mi...@araneidae.co.uk> on 2008/10/16 12:50:29 UTC

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: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Bug with deleted and copied directory

Posted by Talden <ta...@gmail.com>.
> 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've had exactly this, repeatedly.  Similarly it was in a large
scripted operation (reorganising content migrated from CVS in my
case).  I never did identify precisely what the recipe for disaster
was.  I was copying folder trees from a repo location into the WC,
performing partial removals or modifications of subtrees.

The commits were always correct but the WC was toast afterwards, being
halfway between revisions.

--
Talden

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