diff --git a/.github/requirements-earliest.txt b/.github/requirements-earliest.txt index 0701f0b..f2f8b01 100644 --- a/.github/requirements-earliest.txt +++ b/.github/requirements-earliest.txt @@ -1 +1 @@ -mercurial==6.1.4 +mercurial==6.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d82594..d7699ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,16 +26,18 @@ jobs: cache: 'pip' cache-dependency-path: '**/requirements-earliest.txt' - - name: Report selected version - run: echo '${{ steps.earliest.outputs.python-version }}' - - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r .github/requirements-earliest.txt - - name: Look for hg - run: hg --version + - name: Report selected versions + run: | + echo Selected '${{ steps.earliest.outputs.python-version }}' + python --version + python3 --version + hg --version + ./hg-fast-export.sh -h - name: Run tests on earliest supported Python version run: make -C t @@ -58,19 +60,20 @@ jobs: cache: 'pip' cache-dependency-path: '**/requirements-latest.txt' - - name: Report selected version - run: echo '${{ steps.latest.outputs.python-version }}' - - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r .github/requirements-latest.txt - - name: Look for hg - run: hg --version + - name: Report selected version + run: | + echo Selected '${{ steps.latest.outputs.python-version }}' + echo python --version + hg --version + ./hg-fast-export.sh -h - name: Run tests on 3.x - run: make -C t TEST_OPTS="--debug --verbose" + run: make -C t code-quality: name: Run code quality checks diff --git a/hg-fast-export.sh b/hg-fast-export.sh index fd0ff53..b70792a 100755 --- a/hg-fast-export.sh +++ b/hg-fast-export.sh @@ -29,7 +29,7 @@ GFI_OPTS="" if [ -z "${PYTHON}" ]; then # $PYTHON is not set, so we try to find a working python with mercurial: - for python_cmd in python2 python python3; do + for python_cmd in python3 python; do if command -v $python_cmd > /dev/null; then $python_cmd -c 'from mercurial.scmutil import revsymbol' 2> /dev/null if [ $? -eq 0 ]; then @@ -45,6 +45,10 @@ if [ -z "${PYTHON}" ]; then exit 1 fi +echo "Will use python ${PYTHON}" + +${PYTHON} --version + USAGE="[--quiet] [-r ] [--force] [--ignore-unnamed-heads] [-m ] [-s] [--hgtags] [-A ] [-B ] [-T ] [-M ] [-o ] [--hg-hash] [-e ]" LONG_USAGE="Import hg repository up to either tip or If is omitted, use last hg repository as obtained from state file,