comparison 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
comparison
equal deleted inserted replaced
31310:295625f1296b 31311:681046de87f1
324 if not result: 324 if not result:
325 # Empty state built, nothing to rebase 325 # Empty state built, nothing to rebase
326 self.ui.status(_('nothing to rebase\n')) 326 self.ui.status(_('nothing to rebase\n'))
327 return _nothingtorebase() 327 return _nothingtorebase()
328 328
329 root = min(rebaseset) 329 for root in self.repo.set('roots(%ld)', rebaseset):
330 if not self.keepf and not self.repo[root].mutable(): 330 if not self.keepf and not root.mutable():
331 raise error.Abort(_("can't rebase public changeset %s") 331 raise error.Abort(_("can't rebase public changeset %s")
332 % self.repo[root], 332 % root,
333 hint=_("see 'hg help phases' for details")) 333 hint=_("see 'hg help phases' for details"))
334 334
335 (self.originalwd, self.target, self.state) = result 335 (self.originalwd, self.target, self.state) = result
336 if self.collapsef: 336 if self.collapsef:
337 self.targetancestors = self.repo.changelog.ancestors( 337 self.targetancestors = self.repo.changelog.ancestors(
338 [self.target], 338 [self.target],