chiark / gitweb /
test suite: overwrite-chkclog: test UNRELEASED handling.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Jan 2017 15:46:55 +0000 (15:46 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Jan 2017 15:46:56 +0000 (15:46 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/tests/overwrite-chkclog

index d5bef7be10d6b6ec29b7c80782431a1dbe7f8765..6d9f233b7a9707bcf250d8f761ec98baf2bf7fb4 100644 (file)
@@ -5,6 +5,9 @@ dgit (3.9~) unstable; urgency=medium
     is not UNRELEASED.  This could easily happen if this release was being
     made from a git branch which predates the previous package upload.
 
     is not UNRELEASED.  This could easily happen if this release was being
     made from a git branch which predates the previous package upload.
 
+  Test suite:
+  * overwrite-chkclog: test UNRELEASED handling.
+
  --
 
 dgit (3.8) unstable; urgency=medium
  --
 
 dgit (3.8) unstable; urgency=medium
index 3544390a83524ca75d3ac528a886548872b33b83..fee21816365924757ad4924f91418a7db32cd138 100755 (executable)
@@ -23,6 +23,17 @@ git merge dgit/dgit/stable
 git checkout master which
 EDITOR=: git commit
 
 git checkout master which
 EDITOR=: git commit
 
+perl -i~ -pe 's/^(\w+ \(\S+\)) stable/$1 UNRELEASED/ if $.>1' debian/changelog
+git add debian/changelog
+git commit -m 'UNRELEASED changelog'
+
+t-dgit -wgf build
+
+t-expect-fail E:'Distribution.*is UNRELEASED' \
+t-dgit push --overwrite stable
+
+git revert --no-edit 'HEAD^{/UNRELEASED changelog}'
+
 t-dgit -wgf build
 
 perl -i~ -pe 's/^(\w+ \(\S+)(\) stable)/$1+X$2/ if $.>1' debian/changelog
 t-dgit -wgf build
 
 perl -i~ -pe 's/^(\w+ \(\S+)(\) stable)/$1+X$2/ if $.>1' debian/changelog