X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Ftests%2Finarchivecopy;h=632d4206822789c9d7130518e87480d35b42f802;hb=3bdf06f4ea6d3735c73c12903e3ac7ce8447f61a;hp=ed0bcae20639ba21145909be68e64486573fba11;hpb=d106f47c2e2d774ca2f99eb53d4d9038e9a5aa62;p=dgit.git diff --git a/tests/tests/inarchivecopy b/tests/tests/inarchivecopy index ed0bcae2..632d4206 100755 --- a/tests/tests/inarchivecopy +++ b/tests/tests/inarchivecopy @@ -2,9 +2,8 @@ set -e . tests/lib -t-restrict x-dgit-unfinished - t-setup-import examplegit +t-tstunt-parsechangelog cd $p git checkout -b dgit/stable dgit/dgit/stable @@ -15,41 +14,66 @@ t-inarchive-copy () { local from=${2:-sid} local to=${3:-stable} egrep "^${vm//./\\.}" aq/package.$from.$p >>aq/package.$to.$p - t-archive-updated stable $p + t-archive-updated $to $p } copy-check-good () { git diff $vtag - t-refs-same refs/remotes/dgit/dgit/stable + t-refs-same refs/remotes/dgit/dgit/$tosuite t-ref-head + t-has-parent-or-is HEAD $vtag } copy-check () { local vm=$1 - t-inarchive-copy $vm + local tosuite=${2:-stable} + t-inarchive-copy $vm '' $tosuite vtag=$(v=$vm t-v-tag) cd $p t-refs-same-start - t-ref-same $vtag^1 - - t-dgit fetch stable - git merge --ff-only dgit/dgit/stable + t-dgit fetch $tosuite + git merge --ff-only dgit/dgit/$tosuite copy-check-good + local fetched=$(t-sametree-parent HEAD) cd .. rm -rf example.cloned - t-dgit clone $p stable example.cloned + t-dgit clone $p $tosuite example.cloned cd example.cloned + t-refs-same-start + copy-check-good + local cloned=$(t-sametree-parent HEAD) + cd .. + + rm -rf example.initd + mkdir example.initd + cd example.initd + git init + t-refs-same-start + t-dgit -p $p fetch $tosuite + git reset --hard refs/remotes/dgit/dgit/$tosuite copy-check-good + local initd=$(t-sametree-parent HEAD) cd .. + + t-refs-same-start + t-ref-same-val fetched $fetched + t-ref-same-val cloned $cloned + t-ref-same-val initd $initd } copy-check 2.0 copy-check 2.1 -xxx rest of test +cd $p +git checkout -b dgit/testing $(v=1.1 t-v-tag) +cd .. + +copy-check 2.1 testing + +echo ok.