mirror of
https://github.com/facebook/sapling.git
synced 2024-12-29 16:12:23 +03:00
ab3a7cb21f
Summary: In preparation for merging fb-mercurial sources to the Eden repository, move everything from the top-level directory into an `eden/scm` subdirectory.
34 lines
548 B
Bash
Executable File
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') "$@"
|