[PATCH 1 of 2] rebase: allow --detach when --rev is used

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Dec 27 14:19:17 CST 2011


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1325015146 -3600
# Node ID 1a93263a0a2e52016da3b22c735fdcd15388ce3a
# Parent  a11cad4682e5ab3790b2f5f095e5db3ba889d9f0
rebase: allow --detach when --rev is used

--rev is only a more specific --source and there is no reason to refuse to use
detach with it.

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -168,7 +168,7 @@
                 raise util.Abort(_('cannot specify both a '
                                    'revision and a source'))
             if detachf:
-                if not srcf:
+                if not (srcf or revf):
                     raise util.Abort(
                         _('detach requires a revision to be specified'))
                 if basef:


More information about the Mercurial-devel mailing list