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

Merge with unversioned directory causes invalid copyfrom-rev

From: Brian Buesker <bbuesker_at_qualcomm.com>
Date: 2005-02-08 23:19:29 CET

I think I found a bug in how svn merge behaves in the presence of
unversioned directories. When the result of the merge creates a
directory, but that directory previously existed as an unversioned
directory (ie. created with just a normal mkdir, not an svn mkdir), when
the merge completes, the copyfrom-rev attribute for that directory in
the .svn/entries files contains an invalid revision.

For example, consider the following repository layout:


The problem occurs if I perform the following steps:

1. export REPOS=file:///data/bbuesker/tmp/svn.1986
2. svn co $REPOS/trunk
3. cd trunk
4. mkdir dir1
5. svn merge $REPOS/tags/base@HEAD $REPOS/tags/tag@HEAD

After I perform this fourth step, the .svn/entries file within the trunk
consists of the following:
<?xml version="1.0" encoding="utf-8"?>

The copyfrom-rev is an invalid revision, as the latest revision for the
repository is 2. If I take off the @HEAD from the merge, I get a
different copyfrom-rev (0 in this case). However, if I go to commit in
the first case, I get the following error:

Adding dir1
subversion/libsvn_client/commit.c:765: (apr_err=160006)
svn: Commit failed (details follow):
subversion/libsvn_fs_fs/fs_fs.c:989: (apr_err=160006)
svn: No such revision 151920164

In the second case, I get:

Adding dir1
subversion/libsvn_client/commit.c:765: (apr_err=160013)
svn: Commit failed (details follow):
subversion/libsvn_fs_fs/tree.c:299: (apr_err=160013)
svn: File not found: revision 0, path '/tags/tag/dir1'

If I fix up the .svn/entries file manually to use a valid revision for
copyfrom-rev, I am able to commit.

Shouldn't subversion either refuse to do the merge in the case that an
unversioned directory exists and the merge would create that directory,
or use the correct revision number for copyfrom-rev?

I have attached a script which can be used to reproduce the problem.

Here is my environment:
OS: Fedora Core 3

SVN Version:
$ svn --version
svn, version 1.1.2 (r12471)
  compiled Jan 7 2005, 15:34:50

Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
 - handles 'http' schema
 - handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
 - handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network
 - handles 'svn' schema

$ gcc --version
gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

$ perl -v

This is perl, v5.8.5 built for i386-linux-thread-multi

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

Berkeley DB Version: 4.2.52

OpenSSL Version:
$ rpm -q openssl

Please let me know if you need any more information.


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

Received on Tue Feb 8 23:23:52 2005

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

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