Package: aegis / 4.24.3-3

aegis-4.24.3-allow-white-space.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
Index: aegis.git/Makefile.in
===================================================================
--- aegis.git.orig/Makefile.in	2010-04-02 09:46:37.000000000 +0200
+++ aegis.git/Makefile.in	2010-04-02 09:46:47.000000000 +0200
@@ -32047,6 +32047,10 @@
 	CXX="$(CXX)" $(SH) etc/test.sh -shell $(SH) -run \
 		test/02/t0283a-walt.sh test/02/t0283a-walt.ES
 
+test/02/t0289a-walt.ES: test/02/t0289a-walt.sh all-bin etc/test.sh
+	CXX="$(CXX)" $(SH) etc/test.sh -shell $(SH) -run \
+		test/02/t0289a-walt.sh test/02/t0289a-walt.ES
+
 test_base64/main.$(OBJEXT): test_base64/main.cc common/ac/stdio.h \
 		common/config.h common/config.messy.h common/ac/stdlib.h \
 		common/arglex.h common/main.h common/error.h \
@@ -35346,7 +35350,7 @@
 		test/02/t0266a-walt.ES test/02/t0268a-walt.ES \
 		test/02/t0269a-walt.ES test/02/t0270a-walt.ES \
 		test/02/t0273a-walt.ES test/02/t0278a-walt.ES \
-		test/02/t0283a-walt.ES
+		test/02/t0283a-walt.ES test/02/t0289a-walt.ES
 
 clean-obj:
 	rm -f .bin
@@ -37362,6 +37366,7 @@
 	rm -f test/02/t0273a-walt.ES
 	rm -f test/02/t0278a-walt.ES
 	rm -f test/02/t0283a-walt.ES
+	rm -f test/02/t0289a-walt.ES
 	rm -f test_base64/main.$(OBJEXT)
 	rm -f test_cfn/main.$(OBJEXT)
 	rm -f test_cpio/main.$(OBJEXT)
Index: aegis.git/libaegis/change/file/name_check.cc
===================================================================
--- aegis.git.orig/libaegis/change/file/name_check.cc	2010-04-02 09:47:01.000000000 +0200
+++ aegis.git/libaegis/change/file/name_check.cc	2010-04-02 09:47:46.000000000 +0200
@@ -279,17 +279,12 @@
 	    }
 	}
     }
-    else
-    {
-	//
-	// exclude control characters, space characters
-	// and high-bit-on characters
-	// (This is a "C" locale test.)
-	//
-	for (s = fn->str_text; *s; ++s)
-	    if (!isgraph((unsigned char)*s))
-		return 0;
-    }
+    //
+    // Avoid doing more checks using isgraph/isprint or similar
+    // functions, since they can be too strict with respect to other
+    // option selected by the user: allow_white_space_in_filenames,
+    // allow_non_ascii_filenames.
+    //
     return 1;
 }
 
Index: aegis.git/test/02/t0289a-walt.sh
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ aegis.git/test/02/t0289a-walt.sh	2010-04-02 09:48:38.000000000 +0200
@@ -0,0 +1,177 @@
+#!/bin/sh
+#
+# aegis - The "aegis" program.
+# Copyright (C) 2010 Walter Franzini
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+TEST_SUBJECT="file names"
+
+# load up standard prelude and test functions
+. test_funcs
+
+#
+# make a new project
+#
+activity="new project 28"
+aegis -newpro foo -version "" -dir $work/proj -lib $work/lib
+if test $? -ne 0 ; then fail; fi
+
+AEGIS_PROJECT=foo
+export AEGIS_PROJECT
+
+#
+# change project attributes
+#
+activity="project attributes 38"
+cat > atts << 'fubar'
+description = "The \"foo\" program.";
+developer_may_review = true;
+developer_may_integrate = true;
+reviewer_may_integrate = true;
+developers_may_create_changes = true;
+umask = 022;
+default_test_exemption = true;
+default_test_regression_exemption = true;
+minimum_change_number = 10;
+reuse_change_numbers = true;
+minimum_branch_number = 1;
+skip_unlucky = false;
+compress_database = false;
+develop_end_action = goto_awaiting_integration;
+protect_development_directory = false;
+fubar
+test $? -eq 0 || no_result
+
+aegis -proatt -f atts -proj foo -lib $work/lib
+test $? -eq 0 || no_result
+
+activity="new developer 61"
+aegis -newdev $USER
+test $? -eq 0 || no_result
+aegis -new-reviewer $USER
+test $? -eq 0 || no_result
+aegis -new-integrator $USER
+test $? -eq 0 || no_result
+
+activity="new branch 69"
+aegis -new-branch 1 -p $AEGIS_PROJECT
+test $? -eq 0 || no_result
+
+AEGIS_PROJECT=foo.1
+
+activity="new branch 75"
+aegis -new-branch 1 -p $AEGIS_PROJECT
+
+AEGIS_PROJECT=foo.1.1
+
+#
+# create a new change
+#
+activity="new change 83"
+cat > cattr << 'end'
+brief_description = "First change.";
+cause = internal_enhancement;
+end
+test $? -eq 0 || no_result
+aegis -new_change 1 -f cattr -project $AEGIS_PROJECT
+test $? -eq 0 || no_result
+
+activity="develop begin 92"
+aegis -dev-begin 1 -dir $work/dd1
+test $? -eq 0 || no_result
+
+#
+# add a new files to the change
+#
+activity="new file 99"
+aegis -new-file -uuid aaaaaaaa-bbbb-4bbb-8ccc-ccccddddd000 $work/dd1/aegis.conf
+test $? -eq 0 || fail
+
+cat > $work/dd1/aegis.conf << 'fubar'
+build_command = "exit 0";
+diff_command =
+    "set +e;"
+    "diff -a ${quote $original} ${quote $input}"
+    " > ${quote $output};"
+    "test $? -le 1";
+merge_command = "set +e; "
+    "merge -p -L baseline -L Historical -L C$c "
+    "${quote $mostrecent} ${quote $original} ${quote $input} "
+    "> ${quote $output}; "
+    "test $? -le 1";
+history_get_command = "aesvt -check-out -edit ${quote $edit} "
+    "-history ${quote $history} -f ${quote $output}";
+history_put_command = "aesvt -check-in -history ${quote $history} "
+    "-f ${quote $input}";
+history_query_command = "aesvt -query -history ${quote $history}";
+history_content_limitation = binary_capable;
+posix_filename_charset = false;
+shell_safe_filenames = false;
+allow_white_space_in_filenames = true;
+allow_non_ascii_filenames = true;
+fubar
+test $? -eq 0 || no_result
+
+activity="create file 128"
+aegis -nf "$work/dd1/barney and fred"
+test $? -eq 0 || fail
+
+activity="new file 132"
+
+#
+# Now we create a file with a really ugly file name, the base64 trick
+# is used to avoid:
+# 1) the need to use echo -e to print the unicode character since it
+#    may be not available everywhere;
+# 2) the need to relax the aede-policy configuration to accept files
+#    with unicode characters.
+#
+# The content of the file can be recreated with:
+#
+#   echo -e 'il nome del file \xc3\xa8 brutto' | test_base64 -o
+#
+activity="ugly file name 146"
+cat > filename <<EOF
+Content-Type: application/x-aegis-test
+Content-Transfer-Encoding: base64
+
+aWwgbm9tZSBkZWwgZmlsZSDDqCBicnV0dG8K
+EOF
+test $? -eq 0 || no_result
+
+aegis -nf "$work/dd1/`test_base64 -i filename`"
+test $? -eq 0 || fail
+
+activity="check file list 158"
+cat > ok <<EOF
+aegis.conf
+barney and fred
+il nome del file \x00C3\x00A8 brutto
+EOF
+test $? -eq 0 || no_result
+
+aegis -l cf -ter > file_list
+test $? -eq 0 || no_result
+
+diff ok file_list
+test $? -eq 0 || fail
+
+#
+# Only definite negatives are possible.
+# The functionality exercised by this test appears to work,
+# no other guarantees are made.
+#
+pass