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

Re: Trunk to branch merge error on renamed component

From: Murli Varadachari <mvaradachari_at_facebook.com>
Date: Sun, 8 Mar 2009 13:22:39 -0700

Unfortunately It is not possible to reproduce this problem in an isolated test environment - I am sure the merge issues were resolved in 1.5.6 [ confirmed ] and the commits went through in your unit / regression tests. That is not in dispute.

However the problem does come up in our existing repository [ 100GB ] which has a considerable history and not reproducible in any meaningful way via the test script you have provided - as of today another 3 /4 developers have hit the same problem [ specially those who had created these branches prior to the renaming of the component ].

I did run a couple of more tests --

-- created a completely new branch from trunk based on the original branch point @145142

-- merged and committed all changes from trunk to the point just prior to the renaming of the components. This was OK.

-- next I just picked up a single revision from trunk [ where the component was renamed ] and merged it to the updated branch. The commit failed once again.

This does seem to be a server side problem. The only change w.r.t to my server setup [ 1.5.6 ] was the addition the double deletion patch to prevent empty revisions.

http://svn.haxx.se/dev/archive-2008-02/0883.shtml

>>Subversion should cancel a commit that includes the deletion of a file
>> or directory that has already been deleted in the repository.

However in this case the dir in question has not been deleted earlier. Any ways I am going to recompile svnserve without this patch and see if that helps.

It would be useful if I can get a patch that allows svnserve to spit out more diagnostics for this specific type of error. I could recompile svnserver, generate the error and send you the output.

Cheers
murli

On 3/6/09 11:50 AM, "Stefan Sperling" <stsp_at_elego.de> wrote:

On Fri, Mar 06, 2009 at 09:01:20AM -0800, Murli Varadachari wrote:
> I personally ran this with svn 1.5.6. As I mentioned earlier this
> took me past the merge but crashed on commit.
> A developer here used 1.6.0-rc2 to test the same on a different
> host. [ I asked him to do so that would eliminate any environmental
> / host specific issues]. He got the same results.!!

So it looks like the problem is caused by a directory
being renamed on trunk, and merging this rename into
the branch, right?

I can reproduce the problem using the script below, with
1.5.6, some recent build from the 1.6.x branch, and trunk.

But in all cases svn does not stop me from committing
after running 'svn update'.

Is this what you are seeing, too? If not, you have a different
situation, and we need more information to reproduce this
problem locally. Can you try to tweak the script pasted below
so that it does reliably recreate your specific problem?

Thanks,
Stefan

1.5.6 allows me to commit after updating:

  --- Merging r2 through r5 into '.':
  A epsilon/gamma
  A epsilon/gamma/delta
  D gamma
  $ svn ci -m sync with trunk renamebug/branch
  Sending renamebug/branch
  svn: Commit failed (details follow):
  svn: Directory '/branch' is out of date
  $ cd renamebug/branch/
  $ svn up
  At revision 5.
  $ svn ci -mm
  Sending .
  Adding epsilon/gamma
  Adding epsilon/gamma/delta
  Deleting gamma

  Committed revision 6.

1.6.x and trunk detect a tree conflict and I can commit
after I mark it resolved:

  --- Merging r2 through r5 into '.':
  A epsilon/gamma
  A epsilon/gamma/delta
  D gamma
  $ svn ci -m sync with trunk renamebug/branch
  Sending renamebug/branch
  subversion/libsvn_client/commit.c:867: (apr_err=160028)
  svn: Commit failed (details follow):
  subversion/libsvn_repos/commit.c:124: (apr_err=160028)
  svn: Directory '/branch' is out of date
  $ cd renamebug/branch/
  $ svn up
     C gamma
  At revision 5.
  Summary of conflicts:
    Tree conflicts: 1
  $ svn status
   M .
  D C gamma
> local delete, incoming edit upon update
  D gamma/delta
  A + epsilon/gamma
  A + epsilon/gamma/delta
  $ svn resolved gamma
  Resolved conflicted state of 'gamma'
  $ svn ci -mm
  Sending .
  Adding epsilon/gamma
  Adding epsilon/gamma/delta
  Deleting gamma

  Committed revision 6.

renamebug.sh:
#!/bin/sh

set -e

cwd=`pwd`
basename=`basename $0`
scratch_area="`echo $basename | sed -e s/\.sh$//`"
repos=$scratch_area/repos
trunk=$scratch_area/trunk
branch=$scratch_area/branch
trunk_url=file:///$cwd/$repos/trunk
branch_url=file:///$cwd/$repos/branch

set -x

rm -rf $scratch_area
mkdir -p $scratch_area

mkdir -p $trunk
echo alpha > $trunk/alpha
echo beta > $trunk/beta
mkdir $trunk/gamma
echo delta > $trunk/gamma/delta
mkdir $trunk/epsilon
echo zeta > $trunk/epsilon/zeta

svnadmin create $cwd/$repos
svn import $trunk $trunk_url -m "importing project tree"
svn copy $trunk_url $branch_url -m "creating branch"
rm -rf $trunk
svn checkout $trunk_url $trunk
svn checkout $trunk_url ${trunk}2
svn checkout $branch_url $branch

svn mv $trunk/gamma $trunk/epsilon/
svn ci -m "moved dir gamma into epsilon" $trunk

echo "alpha, modified" > $branch/alpha
svn ci -m "changed alpha" $branch
echo "delta, modified" > $branch/gamma/delta
svn ci -m "changed delta" $branch

(cd $branch && svn merge $trunk_url)

# this causes an out-of-date error
svn ci -m "sync with trunk" $branch

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1291179

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-08 21:23:41 CET

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.