From e3e12422fe1e40466ad1e1f9a31374cf8b318db3 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 28 Nov 2007 20:26:06 +0000 Subject: [PATCH] When publishing, check that no more commits have been made. If you committed changes while being asked whether you wanted to publish, the changes would be lost if you accepted since we move HEAD to just after the release. Refuse to publish in that case. --- release.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release.py b/release.py index 7932dcc..75e38ad 100644 --- a/release.py +++ b/release.py @@ -189,6 +189,11 @@ def do_release(local_iface, options): print "Already tagged and added to master feed." else: scm.ensure_committed() + head = scm.get_head_revision() + if head != status.head_before_release: + raise SafeException("Changes committed since we started!\n" + + "HEAD was " + status.head_before_release + "\n" + "HEAD now " + head) tar = tarfile.open(archive_file, 'r:bz2') stream = tar.extractfile(tar.getmember(archive_name + '/' + local_iface_rel_path)) -- 2.11.4.GIT