comparison hgext/rebase.py @ 46863:d9601243b73c

rebase: when using --keep, don't care about pruned commits or divergence `hg rebase --keep` creates duplicate commits (not successors), so I was surprised that it still skips pruned commits and errors out if it "would cause divergence" (it wouldn't). I guess this was just an oversight. We didn't have any tests for it, so I also included that. Differential Revision: https://phab.mercurial-scm.org/D10269
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 25 Mar 2021 11:35:16 -0700
parents 82b17bfc13eb
children ba6881c6a178
comparison
equal deleted inserted replaced
46862:82b17bfc13eb 46863:d9601243b73c
348 348
349 return data 349 return data
350 350
351 def _handleskippingobsolete(self): 351 def _handleskippingobsolete(self):
352 """Compute structures necessary for skipping obsolete revisions""" 352 """Compute structures necessary for skipping obsolete revisions"""
353 if self.keepf:
354 return
353 if not self.ui.configbool(b'experimental', b'rebaseskipobsolete'): 355 if not self.ui.configbool(b'experimental', b'rebaseskipobsolete'):
354 return 356 return
355 obsoleteset = {r for r in self.state if self.repo[r].obsolete()} 357 obsoleteset = {r for r in self.state if self.repo[r].obsolete()}
356 ( 358 (
357 self.obsolete_with_successor_in_destination, 359 self.obsolete_with_successor_in_destination,