You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Purple Streak <mr...@googlemail.com> on 2008/10/11 18:26:35 UTC

Re: Issue with merging files containing spaces

2008/9/24 Karl Fogel <kf...@red-bean.com>:
> "Purple Streak" <mr...@googlemail.com> writes:
>>> On Tue, Sep 16, 2008 at 5:37 PM, Karl Fogel <kf...@red-bean.com> wrote:
>>>>
>>>> Nah, no need -- I committed the fix in r33109.  Thanks for tracing this
>>>> one down.
>>
>> Is it likely this will make it into a bug fix release anytime soon?
>> (I'm glad this thread got posted again - we have the same problem
>> here).
>
> I've nominated it for backport to 1.5.x; hopefully it will make it into
> the next release in that line.
>

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

This is only on HTTP as well btw.  I've not yet managed to build
subversion on windows otherwise i'd try trunk.

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

Re: Issue with merging files containing spaces

Posted by Julian Foad <ju...@btopenworld.com>.
On Sat, 2008-10-11 at 19:26 +0100, Purple Streak wrote:
> 2008/9/24 Karl Fogel <kf...@red-bean.com>:
> > "Purple Streak" <mr...@googlemail.com> writes:
> >>> On Tue, Sep 16, 2008 at 5:37 PM, Karl Fogel <kf...@red-bean.com> wrote:
> >>>>
> >>>> Nah, no need -- I committed the fix in r33109.  Thanks for tracing this
> >>>> one down.
[...]

> This fix apparently went into 1.5.3 (according to CHANGES) - but I can
> still reproduce it.

I have just committed some fixes[1] to the test suite to make it cope
better with spaces in a path name. This could make it easier to find
these kinds of problems.

Specifically, in subversion/tests/cmdline/svntest/main.py you can now
change work_dir from "svn-test-work" to e.g. "svn test work" and then
run the test suite. This now works on local and svnserve. I haven't got
HTTP set up to try it. That might be instructive.

[1] r33604, r33605, r33607.

- Julian


>  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
> 
> This is only on HTTP as well btw.  I've not yet managed to build
> subversion on windows otherwise i'd try trunk.



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

Re: Issue with merging files containing spaces

Posted by Blake Mitchell <bm...@marketmetrix.com>.
Purple Streak wrote:
> This went into 1.5.4 I think. I'm sure remember testing it before we
> deployed it using the script and it worked ok.
>   
I ran through this again just to make sure, looks like exactly the same
bug to me, possibly a regression? This output is from a windows CMD
window, so the line wrapping is a little funny.


C:\Documents and Settings\bmitchell\svn\bmitchell\test>svn --version
svn, version 1.5.5 (r34862)
   compiled Dec 23 2008, 12:42:22

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

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using
Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme


C:\Documents and Settings\bmitchell\svn\bmitchell\test>svn info
Path: .
URL: http://subversion.marketmetrix.com/svn/CM/branch/User/bmitchell/test
Repository Root: http://subversion.marketmetrix.com/svn/CM
Repository UUID: 41c89251-5409-b74b-bda2-d7b59c07fd4b
Revision: 16608
Node Kind: directory
Schedule: normal
Last Changed Author: MARKETMETRIX\bmitchell
Last Changed Rev: 16608
Last Changed Date: 2009-02-05 14:26:47 -0800 (Thu, 05 Feb 2009)


C:\Documents and Settings\bmitchell\svn\bmitchell\test>svn mkdir "test
space"
A         test space

C:\Documents and Settings\bmitchell\svn\bmitchell\test>svn commit -m test
Adding         test\test space

Committed revision 16610.

C:\Documents and Settings\bmitchell\svn\bmitchell\test>cd "test space"

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>svn
mkdir b1
A         b1

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>echo
123 > b1\
test.txt

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>svn
add b1\tes
t.txt
A         b1\test.txt

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>svn
commit -m
test
Adding         test space\b1
Adding         test space\b1\test.txt
Transmitting file data .
Committed revision 16611.

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>svn
copy b1 b2

A         b2

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>echo
ABC >> b2
\test.txt

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>svn
commit -m
test
Adding         test space\b2
Sending        test space\b2\test.txt
Transmitting file data .
Committed revision 16612.

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>svn
merge --re
integrate
"http://subversion.marketmetrix.com/svn/CM/branch/User/bmitchell/test/
test space/b2" b1
svn: URL
'http://subversion.marketmetrix.com/svn/CM/branch/User/bmitchell/test/t
est space/b2' is malformed or the scheme or host or path is missing

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>svn
merge --re
integrate
"http://subversion.marketmetrix.com/svn/CM/branch/User/bmitchell/test/
test%20space/b2" b1
svn: URL
'http://subversion.marketmetrix.com/svn/CM/branch/User/bmitchell/test/t
est space/b2' is malformed or the scheme or host or path is missing

C:\Documents and Settings\bmitchell\svn\bmitchell\test\test space>


Just to confirm the server version:

bmitchell@ops-athena:~$ HEAD
http://subversion.marketmetrix.com/svn/CM/branch/User/bmitchell/
Enter username for Subversion repositories at
subversion.marketmetrix.com:80: bmitchell
Password:
200 OK
Connection: close
Date: Thu, 05 Feb 2009 22:03:11 GMT
Accept-Ranges: bytes
ETag: W/"16594//branch/User/bmitchell"
Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g DAV/2
SVN/1.5.5 mod_auth_sspi/1.0.4
Content-Type: text/html; charset=UTF-8
Last-Modified: Thu, 05 Feb 2009 21:53:37 GMT
Client-Date: Thu, 05 Feb 2009 22:05:59 GMT
Client-Peer: 192.168.1.1:80
Client-Response-Num: 1

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

Re: Issue with merging files containing spaces

Posted by Purple Streak <mr...@googlemail.com>.
This went into 1.5.4 I think. I'm sure remember testing it before we
deployed it using the script and it worked ok.

2009/2/5  <bm...@marketmetrix.com>:
>> "Purple Streak" <mr...@googlemail.com> writes:
>>...
>> Okay, fixed on trunk in r33641, thanks for the reproduction recipe.
>> I've nominated it for backport into the next 1.5.x release, too.
>>...
>
> I'm still seeing this issue with: CollabNetSubversion-server-1.5.5-1.win32 for the server and TortoiseSVN-1.5.7.15182-win32-svn-1.5.5 or CollabNetSubversion-client-1.5.5-1.win32 for the client. Only with HTTP. If I use a file:// connection to the repository it works. Has the fix made it into the release track yet?
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1108639
>

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


Re: Issue with merging files containing spaces

Posted by bm...@marketmetrix.com.
> "Purple Streak" <mr...@googlemail.com> writes:
>...
> Okay, fixed on trunk in r33641, thanks for the reproduction recipe.
> I've nominated it for backport into the next 1.5.x release, too.
>...

I'm still seeing this issue with: CollabNetSubversion-server-1.5.5-1.win32 for the server and TortoiseSVN-1.5.7.15182-win32-svn-1.5.5 or CollabNetSubversion-client-1.5.5-1.win32 for the client. Only with HTTP. If I use a file:// connection to the repository it works. Has the fix made it into the release track yet?

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

Re: Issue with merging files containing spaces

Posted by Karl Fogel <kf...@red-bean.com>.
"Purple Streak" <mr...@googlemail.com> writes:
> 2008/10/12 Karl Fogel <kf...@red-bean.com>:
>> The instructions there are not exact enough to be sure I'm using the
>> right reproduction recipe.
>
> Sorry - I thought i'd been fairly careful but I guess i'd assumed the
> other steps which are pretty much as you assumed, except I did commit
> the merge.
>
>> 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.
>
> Sure I can do that. See below.  Just to re-iterate this is using
> Subversion 1.5.3 on Windows with Apache 2.2.9.  All works fine until
> the last line which gives the problem.  If this works for you on Trunk
> could you try 1.5.3 as well if possible?
>
> Thanks for looking at this.

Okay, fixed on trunk in r33641, thanks for the reproduction recipe.
I've nominated it for backport into the next 1.5.x release, too.

Your scripted reproduction recipe was key.  Once I had that, it was less
than an hour to finishing the bugfix.  It's *amazing* how much time that
saves us.

-Karl

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

Re: Issue with merging files containing spaces

Posted by Purple Streak <mr...@googlemail.com>.
2008/10/12 Karl Fogel <kf...@red-bean.com>:
> The instructions there are not exact enough to be sure I'm using the
> right reproduction recipe.

Sorry - I thought i'd been fairly careful but I guess i'd assumed the
other steps which are pretty much as you assumed, except I did commit
the merge.

> 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.

Sure I can do that. See below.  Just to re-iterate this is using
Subversion 1.5.3 on Windows with Apache 2.2.9.  All works fine until
the last line which gives the problem.  If this works for you on Trunk
could you try 1.5.3 as well if possible?

Thanks for looking at this.


@echo off
rem Setup
svnadmin create c:\svn\repo
svn co http://localhost/svn/repo root
svn mkdir "root/current projects"
svn mkdir "root/current projects/a project"
svn mkdir "root/current projects/a project/trunk" "root/current
projects/a project/branches" "root/current projects/a project/tags"
echo "hello svn" > "root/current projects/a project/trunk/foo.txt"
svn add "root/current projects/a project/trunk/foo.txt"
svn commit -m "setup" root

rem Make a branch and generate 2 working coppies
svn copy -m "branch"
http://localhost/svn/repo/current%%20projects/a%%20project/trunk
http://localhost/svn/repo/current%%20projects/a%%20project/branches/b1
svn co http://localhost/svn/repo/current%%20projects/a%%20project/trunk trunk
svn co http://localhost/svn/repo/current%%20projects/a%%20project/branches/b1 b1

rem modify file in trunk, commit and merge to branch
echo "trunk" > "trunk/foo.txt"
svn commit -m "modify trunk file" trunk
svn merge http://localhost/svn/repo/current%%20projects/a%%20project/trunk b1
svn commit -m "merge to branch" b1
echo "branch" > "b1/foo.txt"
svn commit -m "modify branch" b1

rem update and reintegrate
svn update trunk
svn merge --reintegrate
http://localhost/svn/repo/current%%20projects/a%%20project/branches/b1
trunk

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

Re: Issue with merging files containing spaces

Posted by Karl Fogel <kf...@red-bean.com>.
"Purple Streak" <mr...@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@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org