comparison tests/fixtures/non_ascii_path_1.svndump @ 717:ae5968ffe6fe

svnwrap: fix handling of quotable URLs (fixes #197, refs #132) The way hgsubversion handles URLs that may or may not be quoted is somewhat fragile. As part of fixing issue 132 in 925ff8c5989c, the path component of URLs was always quoted. The URL has been attempted encoded since the initial check-in. The fix from 925ff8c5989c was incomplete; reverting it allows us to clone a URL with a '~' in it.[1] Encoding the URL as UTF-8 seldom works as expected, as the default string encoding is ASCII, causing Python to be unable to decode any URL containing an 8-bit character. The core problem here is that we don't know whether the URL specified by the user is quoted or not. Rather than trying to deal with this ourselves, we pass the problem on to Subversion. Then, we obtain the URL from the RA instance, where it is always quoted. (It's worth noting that the editor interface, on the other hand, always deals with unquoted paths...) Thus, the following invariants should apply to SubversionRepo attributes: - svn_url and root will always be quoted. - subdir will always be unquoted. Tests are added that verify that it won't affect the conversion whether a URL is specified in quoted or unquoted form. Furthermore, a test fixture for this is added *twice*, so that we can thoroughly test both quoted and unquoted URLs. I'm not adding a test dedicated to tildes in URLs; it doesn't seem necessary. [1] Such as <https://svn.kenai.com/svn/winsw~subversion>.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Mon, 04 Oct 2010 21:00:36 -0500
parents
children
comparison
equal deleted inserted replaced
716:38ebf7714cdf 717:ae5968ffe6fe
1 SVN-fs-dump-format-version: 2
2
3 UUID: a7b92ce5-70a8-4e75-99da-c3ca360ae490
4
5 Revision-number: 0
6 Prop-content-length: 56
7 Content-length: 56
8
9 K 8
10 svn:date
11 V 27
12 2010-08-16T13:08:38.494252Z
13 PROPS-END
14
15 Revision-number: 1
16 Prop-content-length: 121
17 Content-length: 121
18
19 K 7
20 svn:log
21 V 20
22 Create project bøb.
23 K 10
24 svn:author
25 V 6
26 danchr
27 K 8
28 svn:date
29 V 27
30 2010-08-16T13:10:12.395716Z
31 PROPS-END
32
33 Node-path: bøb
34 Node-kind: dir
35 Node-action: add
36 Prop-content-length: 10
37 Content-length: 10
38
39 PROPS-END
40
41
42 Node-path: bøb/branches
43 Node-kind: dir
44 Node-action: add
45 Prop-content-length: 10
46 Content-length: 10
47
48 PROPS-END
49
50
51 Node-path: bøb/tags
52 Node-kind: dir
53 Node-action: add
54 Prop-content-length: 10
55 Content-length: 10
56
57 PROPS-END
58
59
60 Node-path: bøb/trunk
61 Node-kind: dir
62 Node-action: add
63 Prop-content-length: 10
64 Content-length: 10
65
66 PROPS-END
67
68
69 Node-path: bøb/trunk/A
70 Node-kind: file
71 Node-action: add
72 Prop-content-length: 10
73 Text-content-length: 1
74 Text-content-md5: 68b329da9893e34099c7d8ad5cb9c940
75 Text-content-sha1: adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
76 Content-length: 11
77
78 PROPS-END
79
80
81
82 Revision-number: 2
83 Prop-content-length: 112
84 Content-length: 112
85
86 K 7
87 svn:log
88 V 11
89 Add a file.
90 K 10
91 svn:author
92 V 6
93 danchr
94 K 8
95 svn:date
96 V 27
97 2010-08-16T14:04:00.624391Z
98 PROPS-END
99
100 Node-path: bøb/trunk/B
101 Node-kind: file
102 Node-action: add
103 Prop-content-length: 10
104 Text-content-length: 1
105 Text-content-md5: 68b329da9893e34099c7d8ad5cb9c940
106 Text-content-sha1: adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
107 Content-length: 11
108
109 PROPS-END
110
111
112