chiark / gitweb /
git-debrebase: test suite: introduce t-make-new-upstream-tarball
[dgit.git] / tests / lib-gdr
index 4cfa62b0354d82f110be2f9384313bef547f5142..74c571ab7743aa2bd7e705a96ec06f943206ddb7 100644 (file)
@@ -12,13 +12,16 @@ t-git-debrebase () {
 '
 }
 
-t-gdr-branch-structure () {
+t-gdr-good () {
        local state=$1
+       local beforetag=$2 # say HEAD to skip this check
        # state should be one of
        #   laundered
        #   stitched
        #   patches
 
+       git diff --quiet ${beforetag-t.before} -- ':.' ':!debian/patches'
+
        local etype netype
 
        case $state in
@@ -105,3 +108,13 @@ t-some-changes () {
        done
        git commit -m "MIXED add both ($token)"
 }
+
+t-make-new-upstream-tarball () {
+       local uv=$1
+       git checkout make-upstream
+       # leaves ust set to filename of orig tarball
+       echo "upstream $uv" >>docs/README
+       git commit -a -m "upstream $uv tarball"
+       ust=example_$uv.orig.tar.gz
+       git archive -o ../$ust --prefix=example-2.0/ make-upstream
+}