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

Merge does not escape copyfrom-url

From: Lele Gaifax <lele_at_nautilus.homeip.net>
Date: 2004-06-03 16:17:37 CEST

Hi all,

It seems that the merge command to not apply the proper escape
transforms on the url it creates. This causes a subsequent error on
commit, with a message "400 Bad request" on PROPFIND.

Strangely my previous message on the problem got lost somewhere, but
since I hit it again, here I am with a new recipe that evidences the
problem.

$ sh p.sh
+ cd /tmp
+ svnadmin create repos
+ svn co file:///tmp/repos wc
Checked out revision 0.
+ cd wc
+ svn mkdir upstream
A upstream
+ touch upstream/first.txt
+ svn ci -m Initial
Adding upstream

Committed revision 1.
+ svn copy upstream custom
A custom
+ svn ci -m Customization
Adding custom

Committed revision 2.
+ touch 'upstream/filename with spaces.txt'
+ svn add 'upstream/filename with spaces.txt'
A upstream/filename with spaces.txt
+ svn ci -m 'Add spaced filename' upstream
Adding upstream/filename with spaces.txt
Transmitting file data .
Committed revision 3.
+ cd custom
+ svn merge -r 2:3 file:///tmp/repos/upstream .
A filename with spaces.txt
+ svn copy '../upstream/filename with spaces.txt' new.txt
A new.txt
+ grep copyfrom .svn/entries
   copyfrom-rev="3"
   copyfrom-url="file:///tmp/repos/upstream/filename%20with%20spaces.txt"/>
   copyfrom-rev="3"
   copyfrom-url="file:///tmp/repos/upstream/filename with spaces.txt"/>
+ svn ci -m 'This trigger the error via http://, not via file://' .
Adding custom/filename with spaces.txt
Adding custom/new.txt

Committed revision 4.

As you can see, the URL generated by the merge isn't escaped. Doing
basically the same via HTTP triggers this message:

subversion/libsvn_client/commit.c:747: (apr_err=175002)
svn: Commit failed (details follow):
subversion/libsvn_ra_dav/util.c:664: (apr_err=175002)
svn: PROPFIND request failed on '/tests/upstream/filename with spaces.txt'
subversion/libsvn_ra_dav/util.c:287: (apr_err=175002)
svn: PROPFIND of '/tests/upstream/filename with spaces.txt': 400 Bad Request (http://svn.server.com)

ciao, lele.

-- 
nickname: Lele Gaifax	| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas	| comincerò ad aver paura di chi mi copia.
email: lele@seldati.it	|		-- Fortunato Depero, 1929.

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

  • text/x-sh attachment: p.sh
Received on Thu Jun 3 17:13:35 2004

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.