X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib-import-chk;h=d6633f96316057f9f2fe96792e493ff850ea91e0;hp=ee33cbefa431bbd36382ebfbca64be4836d97c88;hb=42d2e3ec03b634c5719700c5bcfb27f0f652d74c;hpb=36b36dbb7a6d685dcb7c9f22bfe66113006d6d4e diff --git a/tests/lib-import-chk b/tests/lib-import-chk index ee33cbef..d6633f96 100644 --- a/tests/lib-import-chk +++ b/tests/lib-import-chk @@ -1,4 +1,15 @@ +t-import-chk-authorship () { + perl -ne 'print $1,"\n" if m/^ -- (\S.*\>) /' debian/changelog \ + | t-sort -u \ + > $tmp/authorship.changelog + ${import_chk_changelog_massage:-:} $tmp/authorship.changelog + git log --pretty=format:'%an <%ae>%n%cn <%ce>' \ + | t-sort -u \ + > $tmp/authorship.commits + diff $tmp/authorship.{changelog,commits} +} + t-import-chk1 () { p=$1 v=$2 @@ -15,6 +26,8 @@ t-import-chk2() { cd $p + t-import-chk-authorship + git branch first-import m='Commit for import check' @@ -50,7 +63,7 @@ t-import-chk2() { t-ref-same refs/heads/first-2nd-import for orig in ../${p}_${v%-*}.orig*.tar.*; do - tar -atf $orig | LC_ALL=C sort >../files.o + tar -atf $orig | t-sort >../files.o pfx=$(perl <../files.o -ne ' while (<>) { m#^([^/]+/)# or exit 0; @@ -74,7 +87,7 @@ t-import-chk2() { t-ref-same-val "$orig $start" "$imp" done git ls-tree -r --name-only "$t_ref_val:" \ - | sort >../files.g + | t-sort >../files.g diff ../files.{o,g} done cd ..