Add --splice support to merge command#1794
Closed
bysiber wants to merge 1 commit intosqlalchemy:mainfrom
Closed
Conversation
The merge command now accepts a --splice flag, matching the existing behavior in the revision command. This allows merging revisions that are not current heads, which is useful when creating merge points from non-head branches. Fixes sqlalchemy#1712
sqla-tester
reviewed
Feb 22, 2026
Collaborator
sqla-tester
left a comment
There was a problem hiding this comment.
OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision a0f9b6d of this pull request into gerrit so we can run tests and reviews and stuff
Collaborator
|
New Gerrit review created for change a0f9b6d: https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/6606 |
Collaborator
|
Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/6606 has been merged. Congratulations! :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1712
Adds a
spliceparameter to themerge()command function, matching the existing support inrevision(). This is wired through togenerate_revision()and sincespliceis already registered in_KWARGS_OPTS, the--spliceCLI flag is automatically available foralembic merge.Without this, trying to merge non-head revisions raises an error that suggests using
--splice, but the merge command didn't actually accept that flag.The patch is exactly what @zzzeek proposed in the linked discussion. Test included that verifies both the error without
spliceand success withsplice=True.