sapling/eden/scm/tests/translate
Adam Simpkins ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00

34 lines
548 B
Bash
Executable File

#!/bin/bash
# Translate .t tests to .py tests.
# Usage:
# 1. ./translate test-foo.t
# 2. Edit test-foo-t.py
# 3. Commit
../hg debugpython -- -m testutil.dott.translate --black --verify --hgmv "$@" || exit 1
commitmessagepath="$(mktemp)"
cat > "$commitmessagepath" << EOF
[hg] tests: auto translate "$@"
Summary:
This is done by running:
./translate "$@"
Test Plan: CI
Reviewers: #mercurial
Tags: easy
EOF
finish() {
rm "$commitmessagepath"
}
trap finish EXIT
hg commit -l "$commitmessagepath" $(echo "$@" | sed 's#\.t#-t.py#g') "$@"