1 |
slyfox 10/11/01 20:54:46 |
2 |
|
3 |
Modified: darcs.eclass |
4 |
Log: |
5 |
darcs.eclass: export EDARCS_PATCHCOUNT: var shows amount of patches in pulled repository |
6 |
|
7 |
This feature is requested for 'app-portage/smart-live-rebuild' program |
8 |
(already provided by other SCM eclasses) (bug #343581) |
9 |
|
10 |
Thre request and implementation hints by |
11 |
Alexander Vershilov <alexander.vershilov@×××××.com>. |
12 |
Implementation by Michał Górny <mgorny@g.o>. |
13 |
|
14 |
Thank you, guys! |
15 |
|
16 |
Revision Changes Path |
17 |
1.10 eclass/darcs.eclass |
18 |
|
19 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.10&view=markup |
20 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.10&content-type=text/plain |
21 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?r1=1.9&r2=1.10 |
22 |
|
23 |
Index: darcs.eclass |
24 |
=================================================================== |
25 |
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v |
26 |
retrieving revision 1.9 |
27 |
retrieving revision 1.10 |
28 |
diff -u -r1.9 -r1.10 |
29 |
--- darcs.eclass 19 Jul 2010 02:52:14 -0000 1.9 |
30 |
+++ darcs.eclass 1 Nov 2010 20:54:46 -0000 1.10 |
31 |
@@ -1,6 +1,6 @@ |
32 |
# Copyright 2004 Gentoo Technologies, Inc. |
33 |
# Distributed under the terms of the GNU General Public License v2 |
34 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.9 2010/07/19 02:52:14 slyfox Exp $ |
35 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.10 2010/11/01 20:54:46 slyfox Exp $ |
36 |
# |
37 |
# darcs eclass author: Andres Loeh <kosmikus@g.o> |
38 |
# tla eclass author: <rphillips@g.o> |
39 |
@@ -55,6 +55,12 @@ |
40 |
# add darcs to deps |
41 |
DEPEND="dev-vcs/darcs" |
42 |
|
43 |
+darcs_patchcount() { |
44 |
+ set -- $(${EDARCS_DARCS_CMD} show repo | grep "Num Patches") |
45 |
+ # handle string like: " Num Patches: 3860" |
46 |
+ echo ${3} |
47 |
+} |
48 |
+ |
49 |
# is called from darcs_src_unpack |
50 |
darcs_fetch() { |
51 |
|
52 |
@@ -114,6 +120,9 @@ |
53 |
eval $cmdupdate || die "darcs update command failed" |
54 |
fi |
55 |
|
56 |
+ export EDARCS_PATCHCOUNT=$(darcs_patchcount) |
57 |
+ einfo " patches in repo: ${EDARCS_PATCHCOUNT}" |
58 |
+ |
59 |
popd |
60 |
} |