]>
Commit | Line | Data |
---|---|---|
1db4abaf | 1 | # HG changeset patch |
6fe1b135 | 2 | # Parent cf10176805a0799e83451e1267a79eb055225adf |
1db4abaf P |
3 | |
4 | Add information from hg to INFO command. | |
5 | ||
6 | Information added: | |
7 | The output from 'hg identify' | |
8 | The list of applied patches from the patch queue and their revisions | |
9 | The list of patches from 'hg qseries' and their checksums | |
10 | ||
11 | This patch is to remain in the patch queue, at the top, for development purposes only. | |
12 | ||
13 | Currently this patch sits in position 2 behind the patch for several fixes for m_info.c and version.c.SH. | |
14 | ||
6fe1b135 P |
15 | diff -r cf10176805a0 ircd/version.c.SH |
16 | --- a/ircd/version.c.SH Sat Jul 20 15:04:47 2013 +0100 | |
17 | +++ b/ircd/version.c.SH Sat Jul 20 15:04:51 2013 +0100 | |
1db4abaf | 18 | @@ -99,6 +99,46 @@ |
6fe1b135 P |
19 | |
20 | ( for file in ${srcdir}/include/*.h ; do echo $file ; done ) | ./umkpasswd -5 >> version.c | |
1db4abaf P |
21 | |
22 | + | |
23 | +# gather info from HG | |
24 | +if hg --help 2>&1 >/dev/null; then | |
25 | + | |
26 | + # gather info from the HG patch queue | |
27 | + if [ -d ${srcdir}/.hg/patches ]; then | |
28 | + | |
29 | + echo "Extracting information from HG patch queue ..." | |
30 | + | |
31 | + # revision for applied patches | |
32 | + echo " \"\"," >> version.c | |
33 | + echo " \"PatchApplied:\"," >> version.c | |
34 | + | |
35 | + for file in $(cd ${srcdir} && hg qapplied); do | |
36 | + revision=$(cd ${srcdir}/.hg/patches && hg log $file | grep ^changeset | head -n 1 | awk '{print $2}') | |
37 | + if [ -z "$revision" ]; then | |
38 | + revision="none" | |
39 | + fi | |
40 | + echo " \"[" $file: $revision " ]\"," >> version.c | |
41 | + done | |
42 | + | |
43 | + # checksums for all patch files | |
44 | + echo " \"\"," >> version.c | |
45 | + echo " \"PatchQueue:\"," >> version.c | |
46 | + | |
47 | + for file in $(cd ${srcdir} && hg qseries) ; do | |
48 | + echo " \"[" `./umkpasswd -5 ${srcdir}/.hg/patches/$file` " ]\"," >> version.c | |
49 | + done | |
50 | + | |
51 | + fi | |
52 | + | |
53 | + echo "Extracting information from HG ..." | |
54 | + | |
55 | + # hg identify information | |
56 | + echo "\"Mercurial information: hg identify "`cd ${srcdir} && hg identify`"\"," >> version.c | |
57 | + | |
58 | +fi | |
59 | + | |
60 | + | |
61 | + | |
62 | /bin/cat >>version.c <<!SUB!THIS! | |
63 | 0, | |
64 | }; |