Mercurial > public > mercurial-scm > hg-stable
diff hgext/rebase.py @ 31311:681046de87f1
rebase: abort if *any* commit in rebase set is public
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 11 Mar 2017 10:35:44 -0800 |
parents | f5c71e98f0f7 |
children | f59b6cf663a9 |
line wrap: on
line diff
--- a/hgext/rebase.py Sat Mar 11 13:53:14 2017 -0500 +++ b/hgext/rebase.py Sat Mar 11 10:35:44 2017 -0800 @@ -326,11 +326,11 @@ self.ui.status(_('nothing to rebase\n')) return _nothingtorebase() - root = min(rebaseset) - if not self.keepf and not self.repo[root].mutable(): - raise error.Abort(_("can't rebase public changeset %s") - % self.repo[root], - hint=_("see 'hg help phases' for details")) + for root in self.repo.set('roots(%ld)', rebaseset): + if not self.keepf and not root.mutable(): + raise error.Abort(_("can't rebase public changeset %s") + % root, + hint=_("see 'hg help phases' for details")) (self.originalwd, self.target, self.state) = result if self.collapsef: