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

Re: Issue with merging files containing spaces

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Sat, 11 Oct 2008 23:21:16 -0400

"Purple Streak" <mrpurplestreak_at_googlemail.com> writes:
> This fix apparently went into 1.5.3 (according to CHANGES) - but I can
> still reproduce it. I found the issue at
> http://subversion.tigris.org/issues/show_bug.cgi?id=3278 which
> mentions a fix is on trunk but there aren't any windows builds for
> trunk to test it with.
>
> It's the --reintegrate that fails - for full instructions to reproduce
> see http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=143329

The instructions there are not exact enough to be sure I'm using the
right reproduction recipe. See my commentary on them below (and then
afterwards is my attempt to make a reproduction script, but it does not
reproduce the bug).

The quoted parts below are from the above-referenced mail:

>>> I tried this in a fresh repository (a dump of which is a mere 2Kb text
>>> file which I can zip and send to anyone who wants it!)
>>> I set up a fairly normal structure like this (note spaces in Current
>>> Projects and The Doc)
>>>
>>> +-Repo/
>>> |
>>> +-Current Projects/
>>> |
>>> +-The Doc/
>>> |
>>> +-branches/
>>> |
>>> +-tags/
>>> |
>>> +-trunk/
>>>
>>> I then added a text file into trunk and the did svn copy
>>> http://server/Repo/Current%20Projects/The%20Doc/branches/b1.

Does "added a text file into trunk" mean just 'svn add', or 'svn add'
followed by 'svn commit'? (In my script, I assumed there was a commit
step.) What was the name of the file? What were its contents, if any?

Only one of the arguments to 'svn copy' is given above. What was the
other argument? In my script, I assumed it was

   http://server/Repo/Current%20Projects/The%20Doc/trunk

>>> I then created a working copy of ../branches/b1 and trunk. And then in
>>> the b1 working copy:
>>>
>>> svn merge http://server/svn/Repo/Current%20Projects/The%20Doc/trunk

Was this merge ever committed? If not, it probably can't affect the
other working copy, and therefore isn't relevant to the recipe. If yes,
then the commit command needs to be in the transcript.

>>> and then in the wc of trunk
>>> svn merge --reintegrate
>>> http://server/svn/Repo/Current%20Projects/The%20Doc/branches/b1

I already had a trunk working copy, from the first commands, so I just
used that. Do you really mean you checked out a new working copy of
trunk?

>>> and get the error
>>>
>>> svn: URL 'http://server/svn/Repo/Current Projects/The Doc/branches/b1'
>>> is malformed or the scheme or host or path is missing.

Yup. Right now, I'm not getting that error. Here is the output of my
script:

   ### Making a tree for import...
   ### Done.
   
   ### Importing it...
   ### Done.
   
   A foo.txt
   Adding foo.txt
   Transmitting file data .
   Committed revision 2.
   
   Committed revision 3.
   At revision 3.
   
And below is the script itself. If you can package up your recipe in a
similar, self-contained form, that would be very helpful! That way
there can be no doubt about exactly what the recipe is. A .bat script
is fine; I can translate.
   
------------------------------------------------------------------------
#!/bin/sh

# The next line is the only line you should need to adjust.
SVNDIR=/home/kfogel/src/subversion

SVN=${SVNDIR}/subversion/svn/svn
SVNADMIN=${SVNDIR}/subversion/svnadmin/svnadmin

# Select an access method. If http://, then you'll have to configure
# it in httpd.conf first. I used this:
#
# <Location /ps>
# DAV svn
# SVNParentPath /home/kfogel/src/subversion/ps
# </Location>
URL=http://localhost/ps/repos
# URL=file:///`pwd`/repos

rm -rf repos import-me wc-trunk wc-b1

${SVNADMIN} create repos

echo "### Making a tree for import..."
mkdir import-me
mkdir import-me/"Current Projects"
mkdir import-me/"Current Projects"/"The Doc"
mkdir import-me/"Current Projects"/"The Doc"/branches
mkdir import-me/"Current Projects"/"The Doc"/tags
mkdir import-me/"Current Projects"/"The Doc"/trunk
echo "### Done."
echo ""
echo "### Importing it..."
(cd import-me; ${SVN} import -q -m "Initial import." ${URL})
echo "### Done."
echo ""

${SVN} co -q ${URL}/Current%20Projects/The%20Doc/trunk/ wc-trunk

cd wc-trunk
echo "This is a text file." > foo.txt
${SVN} add foo.txt
${SVN} ci -m "Adding foo.txt on trunk."
cd ..

${SVN} cp -m "Create a branch of trunk." \
          ${URL}/Current%20Projects/The%20Doc/trunk \
          ${URL}/Current%20Projects/The%20Doc/branches/b1

${SVN} co -q ${URL}/Current%20Projects/The%20Doc/branches/b1/ wc-b1

cd wc-b1
# http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=143329
# says to do this, but I don't see how it could possibly be relevant,
# since we never commit the merge. I'm tempted to just take it out.
${SVN} merge ${URL}/Current%20Projects/The%20Doc/trunk
cd ..

cd wc-trunk
# If we don't update here, the 'merge --reintegrate' will fail early
# with this error:
#
# subversion/libsvn_client/merge.c:6733: (apr_err=195016)
# svn: Cannot reintegrate into mixed-revision working copy; \
# try updating first
${SVN} up

# Okay, now try reintegrating:
${SVN} merge --reintegrate ${URL}/Current%20Projects/The%20Doc/branches/b1
cd ..

---------------------------------------------------------------------
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-12 05:21:31 CEST

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

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