/[gentoo-x86]/dev-vcs/git/files/git-1.7.11-optional-cvs.patch
Gentoo

Contents of /dev-vcs/git/files/git-1.7.11-optional-cvs.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun May 20 04:25:24 2012 UTC (2 years, 7 months ago) by robbat2
Branch: MAIN
Version bump, update optional CVS patch to apply on latest git HEAD and 1.7.10.2 release. Port libpcre changes to live ebuild.

(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)

1 From eadb20b065c33d46b49c8c95d8cde0c9fe7c62a4 Mon Sep 17 00:00:00 2001
2 From: Robin Johnson <robbat2@gentoo.org>
3 Date: Sat, 19 May 2012 20:16:01 +0200
4 Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
5 utilities
6
7 Forward-ported from 1.7.3.5 to current git.git master HEAD, commit
8 9de96815493b577ae791d5113a3e354142ffbcae
9 ---
10 Makefile | 37 ++++++++++++++++++++++++--------
11 t/t9200-git-cvsexportcommit.sh | 5 ++++
12 t/t9400-git-cvsserver-server.sh | 8 ++++++-
13 t/t9401-git-cvsserver-crlf.sh | 15 ++++++++----
14 t/t9600-cvsimport.sh | 41 ++++++++++++++++++++++-------------
15 t/t9601-cvsimport-vendor-branch.sh | 11 +++++++++
16 t/t9602-cvsimport-branches-tags.sh | 11 +++++++++
17 t/t9603-cvsimport-patchsets.sh | 11 +++++++++
18 t/test-lib.sh | 1 +
19 9 files changed, 110 insertions(+), 30 deletions(-)
20
21 diff --git a/Makefile b/Makefile
22 index 96ebcf9..db74648 100644
23 --- a/Makefile
24 +++ b/Makefile
25 @@ -224,6 +224,8 @@ all::
26 #
27 # Define NO_TCLTK if you do not want Tcl/Tk GUI.
28 #
29 +# Define NO_CVS if you do not want any CVS interface utilities.
30 +#
31 # The TCL_PATH variable governs the location of the Tcl interpreter
32 # used to optimize git-gui for your system. Only used if NO_TCLTK
33 # is not set. Defaults to the bare 'tclsh'.
34 @@ -401,6 +403,7 @@ LIB_OBJS =
35 PROGRAM_OBJS =
36 PROGRAMS =
37 SCRIPT_PERL =
38 +SCRIPT_PERL_CVS =
39 SCRIPT_PYTHON =
40 SCRIPT_SH =
41 SCRIPT_LIB =
42 @@ -441,18 +444,19 @@ SCRIPT_LIB += git-sh-i18n
43 SCRIPT_PERL += git-add--interactive.perl
44 SCRIPT_PERL += git-difftool.perl
45 SCRIPT_PERL += git-archimport.perl
46 -SCRIPT_PERL += git-cvsexportcommit.perl
47 -SCRIPT_PERL += git-cvsimport.perl
48 -SCRIPT_PERL += git-cvsserver.perl
49 SCRIPT_PERL += git-relink.perl
50 SCRIPT_PERL += git-send-email.perl
51 SCRIPT_PERL += git-svn.perl
52
53 +SCRIPT_PERL_CVS += git-cvsexportcommit.perl
54 +SCRIPT_PERL_CVS += git-cvsimport.perl
55 +SCRIPT_PERL_CVS += git-cvsserver.perl
56 +
57 SCRIPT_PYTHON += git-remote-testgit.py
58 SCRIPT_PYTHON += git-p4.py
59
60 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
61 - $(patsubst %.perl,%,$(SCRIPT_PERL)) \
62 + $(patsubst %.perl,%,$(SCRIPT_PERL) $(SCRIPT_PERL_CVS)) \
63 $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
64 git-instaweb
65
66 @@ -2012,13 +2016,25 @@ $(SCRIPT_LIB) : % : %.sh
67 $(QUIET_GEN)$(cmd_munge_script) && \
68 mv $@+ $@
69
70 +_SCRIPT_PERL_BUILD =
71 +_SCRIPT_PERL_NOBUILD =
72 +
73 ifndef NO_PERL
74 -$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
75 +
76 +_SCRIPT_PERL_BUILD += $(SCRIPT_PERL)
77 +
78 +ifndef NO_CVS
79 +_SCRIPT_PERL_BUILD += $(SCRIPT_PERL_CVS)
80 +else # NO_CVS
81 +_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL_CVS)
82 +endif # NO_CVS
83 +
84 +$(patsubst %.perl,%,$(_SCRIPT_PERL_BUILD)): perl/perl.mak
85
86 perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL
87 $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
88
89 -$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
90 +$(patsubst %.perl,%,$(_SCRIPT_PERL_BUILD)): % : %.perl
91 $(QUIET_GEN)$(RM) $@ $@+ && \
92 INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
93 sed -e '1{' \
94 @@ -2049,14 +2065,17 @@ git-instaweb: git-instaweb.sh gitweb
95 chmod +x $@+ && \
96 mv $@+ $@
97 else # NO_PERL
98 -$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
99 +_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL) $(SCRIPT_PERL_CVS) git-instaweb
100 +endif # NO_PERL
101 +
102 +# This is any perl scripts that were disabled it might be empty...
103 +$(patsubst %.perl,%,$(_SCRIPT_PERL_NOBUILD)): % : unimplemented.sh
104 $(QUIET_GEN)$(RM) $@ $@+ && \
105 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
106 -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
107 unimplemented.sh >$@+ && \
108 chmod +x $@+ && \
109 mv $@+ $@
110 -endif # NO_PERL
111
112 ifndef NO_PYTHON
113 $(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS
114 @@ -2091,7 +2110,7 @@ configure: configure.ac
115 # These can record GIT_VERSION
116 git.o git.spec \
117 $(patsubst %.sh,%,$(SCRIPT_SH)) \
118 - $(patsubst %.perl,%,$(SCRIPT_PERL)) \
119 + $(patsubst %.perl,%,$(SCRIPT_PERL) $(SCRIPT_PERL_CVS)) \
120 : GIT-VERSION-FILE
121
122 TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
123 diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
124 index b59be9a..0cac2f6 100755
125 --- a/t/t9200-git-cvsexportcommit.sh
126 +++ b/t/t9200-git-cvsexportcommit.sh
127 @@ -12,6 +12,11 @@ if ! test_have_prereq PERL; then
128 test_done
129 fi
130
131 +if ! test_have_prereq CVS; then
132 + skip_all='skipping git cvsexportcommit tests, cvs not available'
133 + test_done
134 +fi
135 +
136 cvs >/dev/null 2>&1
137 if test $? -ne 1
138 then
139 diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
140 index 806623e..60ed038 100755
141 --- a/t/t9400-git-cvsserver-server.sh
142 +++ b/t/t9400-git-cvsserver-server.sh
143 @@ -11,9 +11,15 @@ cvs CLI client via git-cvsserver server'
144 . ./test-lib.sh
145
146 if ! test_have_prereq PERL; then
147 - skip_all='skipping git cvsserver tests, perl not available'
148 + skip_all='skipping git-cvsserver tests, perl not available'
149 test_done
150 fi
151 +
152 +if ! test_have_prereq CVS; then
153 + skip_all='skipping git-cvsserver tests, cvs not available'
154 + test_done
155 +fi
156 +
157 cvs >/dev/null 2>&1
158 if test $? -ne 1
159 then
160 diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
161 index ff6d6fb..f0d7aad 100755
162 --- a/t/t9401-git-cvsserver-crlf.sh
163 +++ b/t/t9401-git-cvsserver-crlf.sh
164 @@ -38,15 +38,20 @@ not_present() {
165 fi
166 }
167
168 -cvs >/dev/null 2>&1
169 -if test $? -ne 1
170 +if ! test_have_prereq PERL
171 then
172 - skip_all='skipping git-cvsserver tests, cvs not found'
173 + skip_all='skipping git-cvsserver tests, perl not available'
174 test_done
175 fi
176 -if ! test_have_prereq PERL
177 +if ! test_have_prereq CVS
178 then
179 - skip_all='skipping git-cvsserver tests, perl not available'
180 + skip_all='skipping git-cvsserver tests, cvs not available'
181 + test_done
182 +fi
183 +cvs >/dev/null 2>&1
184 +if test $? -ne 1
185 +then
186 + skip_all='skipping git-cvsserver tests, cvs not found'
187 test_done
188 fi
189 "$PERL_PATH" -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
190 diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
191 index 4c384ff..d601f32 100755
192 --- a/t/t9600-cvsimport.sh
193 +++ b/t/t9600-cvsimport.sh
194 @@ -3,14 +3,25 @@
195 test_description='git cvsimport basic tests'
196 . ./lib-cvs.sh
197
198 -test_expect_success PERL 'setup cvsroot environment' '
199 +if ! test_have_prereq PERL
200 +then
201 + skip_all='skipping git cvsimport tests, perl not available'
202 + test_done
203 +fi
204 +if ! test_have_prereq CVS
205 +then
206 + skip_all='skipping git cvsimport tests, cvs not available'
207 + test_done
208 +fi
209 +
210 +test_expect_success 'setup cvsroot environment' '
211 CVSROOT=$(pwd)/cvsroot &&
212 export CVSROOT
213 '
214
215 -test_expect_success PERL 'setup cvsroot' '$CVS init'
216 +test_expect_success 'setup cvsroot' '$CVS init'
217
218 -test_expect_success PERL 'setup a cvs module' '
219 +test_expect_success 'setup a cvs module' '
220
221 mkdir "$CVSROOT/module" &&
222 $CVS co -d module-cvs module &&
223 @@ -42,23 +53,23 @@ EOF
224 )
225 '
226
227 -test_expect_success PERL 'import a trivial module' '
228 +test_expect_success 'import a trivial module' '
229
230 git cvsimport -a -R -z 0 -C module-git module &&
231 test_cmp module-cvs/o_fortuna module-git/o_fortuna
232
233 '
234
235 -test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
236 +test_expect_success 'pack refs' '(cd module-git && git gc)'
237
238 -test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
239 +test_expect_success 'initial import has correct .git/cvs-revisions' '
240
241 (cd module-git &&
242 git log --format="o_fortuna 1.1 %H" -1) > expected &&
243 test_cmp expected module-git/.git/cvs-revisions
244 '
245
246 -test_expect_success PERL 'update cvs module' '
247 +test_expect_success 'update cvs module' '
248 (cd module-cvs &&
249 cat <<EOF >o_fortuna &&
250 O Fortune,
251 @@ -86,7 +97,7 @@ EOF
252 )
253 '
254
255 -test_expect_success PERL 'update git module' '
256 +test_expect_success 'update git module' '
257
258 (cd module-git &&
259 git config cvsimport.trackRevisions true &&
260 @@ -97,7 +108,7 @@ test_expect_success PERL 'update git module' '
261
262 '
263
264 -test_expect_success PERL 'update has correct .git/cvs-revisions' '
265 +test_expect_success 'update has correct .git/cvs-revisions' '
266
267 (cd module-git &&
268 git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
269 @@ -105,7 +116,7 @@ test_expect_success PERL 'update has correct .git/cvs-revisions' '
270 test_cmp expected module-git/.git/cvs-revisions
271 '
272
273 -test_expect_success PERL 'update cvs module' '
274 +test_expect_success 'update cvs module' '
275
276 (cd module-cvs &&
277 echo 1 >tick &&
278 @@ -114,7 +125,7 @@ test_expect_success PERL 'update cvs module' '
279 )
280 '
281
282 -test_expect_success PERL 'cvsimport.module config works' '
283 +test_expect_success 'cvsimport.module config works' '
284
285 (cd module-git &&
286 git config cvsimport.module module &&
287 @@ -126,7 +137,7 @@ test_expect_success PERL 'cvsimport.module config works' '
288
289 '
290
291 -test_expect_success PERL 'second update has correct .git/cvs-revisions' '
292 +test_expect_success 'second update has correct .git/cvs-revisions' '
293
294 (cd module-git &&
295 git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
296 @@ -135,7 +146,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '
297 test_cmp expected module-git/.git/cvs-revisions
298 '
299
300 -test_expect_success PERL 'import from a CVS working tree' '
301 +test_expect_success 'import from a CVS working tree' '
302
303 $CVS co -d import-from-wt module &&
304 (cd import-from-wt &&
305 @@ -148,12 +159,12 @@ test_expect_success PERL 'import from a CVS working tree' '
306
307 '
308
309 -test_expect_success PERL 'no .git/cvs-revisions created by default' '
310 +test_expect_success 'no .git/cvs-revisions created by default' '
311
312 ! test -e import-from-wt/.git/cvs-revisions
313
314 '
315
316 -test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
317 +test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
318
319 test_done
320 diff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh
321 index 827d39f..d730a41 100755
322 --- a/t/t9601-cvsimport-vendor-branch.sh
323 +++ b/t/t9601-cvsimport-vendor-branch.sh
324 @@ -34,6 +34,17 @@
325 test_description='git cvsimport handling of vendor branches'
326 . ./lib-cvs.sh
327
328 +if ! test_have_prereq PERL
329 +then
330 + skip_all='skipping git cvsimport tests, perl not available'
331 + test_done
332 +fi
333 +if ! test_have_prereq CVS
334 +then
335 + skip_all='skipping git cvsimport tests, cvs not available'
336 + test_done
337 +fi
338 +
339 setup_cvs_test_repository t9601
340
341 test_expect_success PERL 'import a module with a vendor branch' '
342 diff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh
343 index e1db323..68f0974 100755
344 --- a/t/t9602-cvsimport-branches-tags.sh
345 +++ b/t/t9602-cvsimport-branches-tags.sh
346 @@ -6,6 +6,17 @@
347 test_description='git cvsimport handling of branches and tags'
348 . ./lib-cvs.sh
349
350 +if ! test_have_prereq PERL
351 +then
352 + skip_all='skipping git cvsimport tests, perl not available'
353 + test_done
354 +fi
355 +if ! test_have_prereq CVS
356 +then
357 + skip_all='skipping git cvsimport tests, cvs not available'
358 + test_done
359 +fi
360 +
361 setup_cvs_test_repository t9602
362
363 test_expect_success PERL 'import module' '
364 diff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh
365 index 52034c8..db4d682 100755
366 --- a/t/t9603-cvsimport-patchsets.sh
367 +++ b/t/t9603-cvsimport-patchsets.sh
368 @@ -14,6 +14,17 @@
369 test_description='git cvsimport testing for correct patchset estimation'
370 . ./lib-cvs.sh
371
372 +if ! test_have_prereq PERL
373 +then
374 + skip_all='skipping git cvsimport tests, perl not available'
375 + test_done
376 +fi
377 +if ! test_have_prereq CVS
378 +then
379 + skip_all='skipping git cvsimport tests, cvs not available'
380 + test_done
381 +fi
382 +
383 setup_cvs_test_repository t9603
384
385 test_expect_failure 'import with criss cross times on revisions' '
386 diff --git a/t/test-lib.sh b/t/test-lib.sh
387 index 9e2b711..0310fba 100644
388 --- a/t/test-lib.sh
389 +++ b/t/test-lib.sh
390 @@ -616,6 +616,7 @@ case $(uname -s) in
391 esac
392
393 ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
394 +test -z "$NO_CVS" && test_set_prereq CVS
395 test -z "$NO_PERL" && test_set_prereq PERL
396 test -z "$NO_PYTHON" && test_set_prereq PYTHON
397 test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE
398 --
399 1.7.4.1.343.ga91df.dirty

  ViewVC Help
Powered by ViewVC 1.1.20