mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
34 lines
548 B
Plaintext
34 lines
548 B
Plaintext
|
#!/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') "$@"
|