From: Oliver Beattie Date: Thu, 5 Sep 2013 16:03:24 +0000 (+0100) Subject: More informative error message when trying to retrieve a single head, but there are... X-Git-Tag: rel_0_6_1~31^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a56325915f8a7d88798253c27b7b69eb7cf931df;p=thirdparty%2Fsqlalchemy%2Falembic.git More informative error message when trying to retrieve a single head, but there are multiple. --- diff --git a/alembic/script.py b/alembic/script.py index 77366e30..d019480e 100644 --- a/alembic/script.py +++ b/alembic/script.py @@ -246,6 +246,11 @@ class ScriptDirectory(object): """ current_heads = self.get_heads() if len(current_heads) > 1: + raise util.CommandError('Only a single head is supported. The ' + 'script directory has multiple heads (due to branching), which' + 'must be resolved by manually editing the revision files to ' + 'form a linear sequence. Run `alembic branches` to see the ' + 'divergence(s).') raise util.CommandError("Only a single head supported so far...") if current_heads: return current_heads[0]