Skip to content
Snippets Groups Projects
Commit 1755e1d9d1c3 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

rebase: extra default destination in its own function

This makes it much simple to wrap for other extension.
parent c027641f8a83
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,12 @@
c(ctx, extra)
return extrafn
def _destrebase(repo):
# Destination defaults to the latest revision in the
# current branch
branch = repo[None].branch()
return repo[branch].rev()
def _rebasedefaultdest(repo, subset, x):
# ``_rebasedefaultdest()``
......@@ -73,10 +79,7 @@
# # XXX: - probably merging with the merge destination.
# i18n: "_rebasedefaultdest" is a keyword
revset.getargs(x, 0, 0, _("_rebasedefaultdest takes no arguments"))
# Destination defaults to the latest revision in the
# current branch
branch = repo[None].branch()
return subset & revset.baseset([repo[branch].rev()])
return subset & revset.baseset([_destrebase(repo)])
@command('rebase',
[('s', 'source', '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment