comparison docs/tutorial/testlib/common.sh @ 3376:aad37ffd7d58

doc: import the training support Import the training support which was stored in a private-repository before.
author Boris Feld <boris.feld@octobus.net>
date Mon, 08 Jan 2018 11:46:53 +0100
parents
children
comparison
equal deleted inserted replaced
3375:1cb549cd6236 3376:aad37ffd7d58
1 #!/bin/bash
2 . $TESTDIR/testlib/pythonpath.sh
3
4 mkcommit() {
5 echo "$1" > "$1"
6 hg add "$1"
7 hg ci -m "$1"
8 }
9
10 getid() {
11 hg log --hidden --template '{node}\n' --rev "$1"
12 }
13
14 cat >> $HGRCPATH <<EOF
15 [alias]
16 debugobsolete=debugobsolete -d '0 0'
17 EOF
18
19 html_output() {
20 filepath="$1"
21 touch "$filepath"
22 shift
23
24 python $TESTDIR/testlib/arguments_printer.py 'hg' "$@" > "$filepath"
25 hg "$@" --color=always 2>&1 | aha -n | tee -a "$filepath"
26 }
27
28 html_raw_output() {
29 filepath="$1"
30 touch "$filepath"
31 shift
32
33 # python $TESTDIR/testlib/arguments_printer.py "$@" > "$filepath"
34 echo "" > "$filepath"
35 "$@" | tee -a "$filepath"
36 }
37
38 graph() {
39 hg docgraph --rankdir LR --arrowhead=true --obsarrowhead=true --sphinx-directive --dot-output "$@"
40 }