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

Issue #1901 (double slashes screw things): Patch, and some strategy questions

From: Shlomi Fish <shlomif_at_iglu.org.il>
Date: 2004-06-20 16:07:53 CEST

Hi all!

Attached is a proposed patch to Issue #1901:

http://subversion.tigris.org/issues/show_bug.cgi?id=1901

The issue concerns the fact that copying two URLs with double slashes in
certain places, can cause Subversion to crash with an assertion (and possibly
other problems as reported in the comments). The patch fixes them by ensuring
that double slashes are removed at the beginning of the call to
svn_client_copy() and friends.

A possible problem is that: (which I wrote in the Issue Page):

<<<
Well, the patch I sent above corrects the problem, but I'm not sure if in the
right way. It does so, by filtering out double slashes from URLs inputted to
the svn_client_copy() and svn_client_move() functions. So, the bug still
exists in the lower levels, but it isn't encountered this way.
 
We should decide whether we can deal with double slashes in URLs (or in paths)
when being inputted at every stage, or that the routines can be expected to
fail if given such input.
>>>

What do you think?

Here's the log:

<<<
Fixes Issue #1901 ( Crash in copy command with URL with double slashes ).

* include/svn_path.h
  Added the declaration of svn_path_url_remove_multiple_slashes().

* libsvn_subr/path.c
  Added the definition of svn_path_url_remove_multiple_slashes().

* libsvn_client/copy.c
  (setup_copy): Filtered out multiple slashes in the URLs in the calls to
  svn_client_copy() and friends.

* tests/libsvn_subr/path-test.c
  Added tests to test the svn_path_url_remove_multiple_slashes() function.

* tests/clients/cmdline/copy_tests.py
  Added a regression test.
>>>

Regards,

        Shlomi Fish

-- 
---------------------------------------------------------------------
Shlomi Fish      shlomif@iglu.org.il
Homepage:        http://shlomif.il.eu.org/
Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]


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

Received on Sun Jun 20 16:03:33 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.