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

Annoyance merging: "Cannot replace a directory from within"

From: Greg Ward <gward_at_python.net>
Date: 2005-03-19 04:23:10 CET

Trying to merge some changes from the trunk to a recently-created
branch, I'm being stymied by the error message "svn: Cannot replace a
directory from within". Let me explain the background here so you can
understand what I'm trying to merge and why.

The project in question is Optik, a Python library that has an alternate
life as optparse in the Python standard library. Optik 1.5a2 was
included with Python 2.4; I've since added some small features, released
Optik 1.5, and am close to releasing Optik 1.5.1. Alas, those small
features disqualify Optik 1.5 or 1.5.1 from being included with Python
2.4.1. But I'd like to backport some of the doc changes I've made
leading up to Optik 1.5.1 to Python 2.4.1. So I "svn copy"'d
/tags/optik-1.5a2 to /branches/python-2.4, just on the offchance that
there might be future bug fixes or other doc changes that absolutely
have to be made in the Python 2.4 branch. (Plus I've been looking for
an excuse to play around with merging with Subversion.)

Here are the relevant revisions:

  r437 2004-10-26 copy "/trunk" to "/tags/optik-1.5a2"
  r464 2004-11-11 doc fixes/additions in /trunk/doc/reference.txt
  r490 2005-03-08 more doc additions
  r491 2005-03-16 more doc additions
  r495 2005-03-16 more doc additions
  r496 2005-03-16 copy "/tags/optik-1.5a2" to "/branches/python-2.4"
  r497 2005-03-18 more doc additions
  r499 2005-03-18 more doc additions
  r500 2005-03-18 tweak doc-generating script (/trunk/mkpydoc)

What I want to do is merge all of the above doc changes from the trunk
to /branches/python-2.4, since these are the doc changes that I want to
get into Python 2.4.1. As a rough approximation, I'd be happy to merge
all changes on the trunk from r437 to HEAD to doc/reference.txt on
/branches/python-2.4, and then edit the file to remove text that
describes new features and therefore does not belong in Python 2.4.1.

My first attempt was this (you can play along at home, since this is a
public repository):

  $ svn co svn://starship.python.net/optik/branches/python-2.4 \
           optik-python-2.4
  [...]
  $ cd optik-python-2.4
  $ svn merge -r437:HEAD \
        svn://starship.python.net/optik/trunk/doc/reference.txt
  svn: Cannot replace a directory from within

Huh? Like others before me, I have google'd for that error message, and
not been terribly enlightened by what I found. After much screwing
around, I hit upon something that works:

  $ cd doc
  $ svn merge -r437:HEAD \
        svn://starship.python.net/optik/trunk/doc/reference.txt
  U reference.txt

Note that I'm running the exact same command -- it only works unless I
run it from the directory that contains the file I want to merge.

Can anyone explain 1) what "Cannot replace a directory from within"
means in this context, and 2) why I have to "cd doc" before I can merge
changes into doc/reference.txt?

Thanks --

        Greg

-- 
Greg Ward <gward_at_python.net>                         http://www.gerg.ca/
I am NOT a nut....
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 19 04:28:29 2005

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