tests/testlib/common.sh
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 17 Jul 2019 11:45:37 -0700
changeset 4754 75307f276a79
parent 2119 e1c26c632b6d
permissions -rw-r--r--
py3: make random topic name generation consistent across py2/py3 random.choice() (and others based on random.randint()) changed between py2 and py3 without a way to get the py2 behavior. However, random.random() did not change, so we can re-implement random.choice() based on that.

. $TESTDIR/testlib/pythonpath.sh

mkcommit() {
   echo "$1" > "$1"
   hg add "$1"
   hg ci -m "$1"
}

getid() {
   hg log --hidden --template '{node}\n' --rev "$1"
}

cat >> $HGRCPATH <<EOF
[alias]
debugobsolete=debugobsolete -d '0 0'
EOF