gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Fix the faulty merge of unify-sources.sh in [586b65073025]
0 1 0
default
1 file changed with 4 insertions and 0 deletions:
↑ Collapse diff ↑
Ignore white space 48 line context
1 1
#!/bin/bash
2 2

	
3 3
YEAR=`date +%Y`
4 4
HGROOT=`hg root`
5 5

	
6 6
function hg_year() {
7 7
    if [ -n "$(hg st $1)" ]; then
8 8
        echo $YEAR
9
    else
10
        hg log -l 1 --template='{date|isodate}\n' $1 |
11
        cut -d '-' -f 1
12
    fi
9 13
}
10 14

	
11 15
# file enumaration modes
12 16

	
13 17
function all_files() {
14 18
    hg status -a -m -c |
15 19
    cut -d ' ' -f 2 | grep -E '(\.(cc|h|dox)$|Makefile\.am$)' |
16 20
    while read file; do echo $HGROOT/$file; done
17 21
}
18 22

	
19 23
function modified_files() {
20 24
    hg status -a -m |
21 25
    cut -d ' ' -f 2 | grep -E  '(\.(cc|h|dox)$|Makefile\.am$)' |
22 26
    while read file; do echo $HGROOT/$file; done
23 27
}
24 28

	
25 29
function changed_files() {
26 30
    {
27 31
        if [ -n "$HG_PARENT1" ]
28 32
        then
29 33
            hg status --rev $HG_PARENT1:$HG_NODE -a -m
30 34
        fi
31 35
        if [ -n "$HG_PARENT2" ]
32 36
        then
0 comments (0 inline)