| 1 |
# setup config and various utility to test new heads checks on push |
| 2 |
|
| 3 |
cat >> $HGRCPATH <<EOF |
| 4 |
[command-templates] |
| 5 |
# simpler log output |
| 6 |
log ="{node|short} ({phase}): {desc}\n" |
| 7 |
|
| 8 |
[phases] |
| 9 |
# non publishing server |
| 10 |
publish=False |
| 11 |
|
| 12 |
[extensions] |
| 13 |
# we need to strip some changeset for some test cases |
| 14 |
strip= |
| 15 |
|
| 16 |
[experimental] |
| 17 |
# enable evolution |
| 18 |
evolution=all |
| 19 |
|
| 20 |
[alias] |
| 21 |
# fix date used to create obsolete markers. |
| 22 |
debugobsolete=debugobsolete -d '0 0' |
| 23 |
EOF |
| 24 |
|
| 25 |
mkcommit() { |
| 26 |
echo "$1" > "$1" |
| 27 |
hg add "$1" |
| 28 |
hg ci -m "$1" |
| 29 |
} |
| 30 |
|
| 31 |
getid() { |
| 32 |
hg log --hidden --template '{node}\n' --rev "$1" |
| 33 |
} |
| 34 |
|
| 35 |
setuprepos() { |
| 36 |
echo creating basic server and client repo |
| 37 |
hg init server |
| 38 |
cd server |
| 39 |
mkcommit root |
| 40 |
hg phase --public . |
| 41 |
mkcommit A0 |
| 42 |
cd .. |
| 43 |
hg clone server client |
| 44 |
|
| 45 |
if [ "$1" = "single-head" ]; then |
| 46 |
echo >> "server/.hg/hgrc" "[experimental]" |
| 47 |
echo >> "server/.hg/hgrc" "# enforce a single name per branch" |
| 48 |
echo >> "server/.hg/hgrc" "single-head-per-branch = yes" |
| 49 |
fi |
| 50 |
} |