From a56325915f8a7d88798253c27b7b69eb7cf931df Mon Sep 17 00:00:00 2001 From: Oliver Beattie Date: Thu, 5 Sep 2013 17:03:24 +0100 Subject: [PATCH] More informative error message when trying to retrieve a single head, but there are multiple. --- alembic/script.py | 5 +++++ 1 file changed, 5 insertions(+) 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] -- 2.47.2