diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-08 03:07:54 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-08 23:43:35 +0000 |
commit | 1e6f35b49eab4973724a5e769588f1948c5a8138 (patch) | |
tree | f3c5b5df8bea1bd94cedb12f7bd87892404ee31a /tests | |
parent | 875890db76dd76cc1169fed3f5a2da5deae5590a (diff) |
test suite: downtream-gitless: Add some rewriting
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tests/downstream-gitless | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/tests/downstream-gitless b/tests/tests/downstream-gitless index 1912613..4b72470 100755 --- a/tests/tests/downstream-gitless +++ b/tests/tests/downstream-gitless @@ -6,6 +6,48 @@ set -e t-setup-import examplegit t-tstunt-parsechangelog + +# rewrite some things, so we test the rewriting code + +mkdir map +cd map +git init +cd .. + +record-map () { + old=$(t-git-get-ref-exact "refs/original/$r") + new=$(t-git-get-ref-exact "$r") + if [ "$old" = "$new" ]; then return; fi + echo >>$tmp/map/map "$old $new" +} + +filter () { + git filter-branch \ + --msg-filter 'sed s/Sid/Spong/' \ + --tag-name-filter cat \ + ^archive/test-dummy/2.0 \ + "$@" + for r in "$@"; do + record-map "$r" + done +} + +cd $p +filter \ + refs/heads/master \ + refs/remotes/dgit/dgit/sid \ + +cd ../git/$p.git +filter \ + refs/dgit/sid + +cd $tmp/map +git add map +git commit -m 'by test suite' +git push $tmp/git/$p.git master:refs/dgit-rewrite/map +cd .. + + suitespecs=avon t-reprepro-cfg ds- downstream t-reprepro-setup ds- @@ -21,4 +63,9 @@ t-git-config dgit-distro.downstream.git-check false t-dgit clone example avon example.avon +t-reprepro-includedsc avon $tmp/mirror/pool/main/example_2.1.dsc ds- + +cd $p.avon +t-dgit fetch + #t-ok |