[PATCH 11 of 16] rebase: move collapsef and collapsemsg validation to the rebase runtime object
Kostia Balytskyi
ikostia at fb.com
Sun May 29 18:38:42 EDT 2016
# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# Date 1464527188 -3600
# Sun May 29 14:06:28 2016 +0100
# Node ID 53fe86cc5c32e109a85ca689428d0cebbcd1897e
# Parent 44f5af0d5d1057ab359aef0bcd1bc7f8b06376c3
rebase: move collapsef and collapsemsg validation to the rebase runtime object
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -175,6 +175,10 @@
"'histedit' extension (see \"%s\")") % help
raise error.Abort(msg)
+ if self.collapsemsg and not self.collapsef:
+ raise error.Abort(
+ _('message can only be specified with collapse'))
+
@command('rebase',
[('s', 'source', '',
_('rebase the specified changeset and descendants'), _('REV')),
@@ -293,10 +297,6 @@
wlock = repo.wlock()
lock = repo.lock()
- if rtstate.collapsemsg and not rtstate.collapsef:
- raise error.Abort(
- _('message can only be specified with collapse'))
-
if rtstate.contf or rtstate.abortf:
if rtstate.contf and rtstate.abortf:
raise error.Abort(_('cannot use both abort and continue'))
More information about the Mercurial-devel
mailing list