# HG changeset patch # User Roy Marples # Date 1611096809 0 # Node ID 1f5544a8870bf8676a6bd224db1e10b51dcf7ab0 # Parent 34bdd4f7773a609272930804b52006aa68b83b9c Add a script to import python-fastimport to our liking diff -r 34bdd4f7773a -r 1f5544a8870b hgext3rd/fastimport/vendor/import-python-fastimport.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hgext3rd/fastimport/vendor/import-python-fastimport.sh Tue Jan 19 22:53:29 2021 +0000 @@ -0,0 +1,32 @@ +#!/bin/sh +# Cleanup the python-fastimport sources to our liking + +# NOTE: The home page is https://github.com/jelmer/python-fastimport +# But the upstream release is called fastimport. +# As such there are confusing names. +# This script will attempt to rename both to python_fastimport to +# reflect the vendor and satisfy a module name a dash is not allowed. + +# untar the distribution here, for example +# tar xvjpf python-fastimport-0.9.8.tar.gz + +set -xe +rm -rf python_fastimport_tmp +if [ -d python-fastimport-* ]; then + mv python-fastimport* python_fastimport_tmp +elif [ -d fastimport-* ]; then + mv fastimport-* python_fastimport_tmp +else + echo "No idea how to import!" >2 + exit 1 +fi + +find python_fastimport_tmp -mindepth 1 ! -name AUTHORS ! -name COPYING \ + ! -name NEWS ! -name README.md \ + ! -regex '^python_fastimport_tmp/fastimport\(.*\)' \ + -delete +mv python_fastimport_tmp/fastimport/* python_fastimport_tmp/ +rmdir python_fastimport_tmp/fastimport + +rm -rf python_fastimport +mv python_fastimport_tmp python_fastimport