diff options
author | Oliver Beattie <oliver@obeattie.com> | 2013-09-05 17:03:24 +0100 |
---|---|---|
committer | Oliver Beattie <oliver@obeattie.com> | 2013-09-05 17:03:24 +0100 |
commit | a56325915f8a7d88798253c27b7b69eb7cf931df (patch) | |
tree | dfb2980baf3c0482ef3e815b90e8b458d3007245 /alembic/script.py | |
parent | 686d13daf2a6f06ea83a8f0eaec77fcf74953089 (diff) | |
download | alembic-a56325915f8a7d88798253c27b7b69eb7cf931df.tar.gz |
More informative error message when trying to retrieve a single head, but there are multiple.
Diffstat (limited to 'alembic/script.py')
-rw-r--r-- | alembic/script.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/alembic/script.py b/alembic/script.py index 77366e3..d019480 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] |