aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion/templates/converted_to_git
blob: 8f137506fecdad89118f5de652d4db64a5cf203b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

REPOS="$1"
TXN="$2"

if [ ! -f "$REPOS/conf/git.conf" ]; then
    exit 0
fi

REGEX=$(cat "$REPOS/conf/git.conf" | grep -v "^#" | grep -v "^ *$" | xargs | sed 's/ /|/g')

if (svnlook dirs-changed -t $TXN "$REPOS" | grep -qE "^($REGEX)"); then
    echo "The subversion path you have attempted to commit to has been converted to git." >&2
    echo "Please see: https://wiki.mageia.org/en/Git_Migration" >&2
    exit 1
fi