rebase: allow --detach when --rev is used
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 27 Dec 2011 20:45:46 +0100
changeset 15736 306e84e8bbe9
parent 15735 5b384b7f48d5
child 15737 8edd9f2c7b57
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.
hgext/rebase.py
--- a/hgext/rebase.py	Mon Dec 26 18:08:20 2011 -0600
+++ b/hgext/rebase.py	Tue Dec 27 20:45:46 2011 +0100
@@ -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: