hgext/rebase.py
changeset 45085 a0192a03216d
parent 44960 78cafd48b9b2
child 45087 83f75f1efdcc
equal deleted inserted replaced
45084:07b3166e94ca 45085:a0192a03216d
   527         if date is None:
   527         if date is None:
   528             date = ctx.date()
   528             date = ctx.date()
   529         extra = {b'rebase_source': ctx.hex()}
   529         extra = {b'rebase_source': ctx.hex()}
   530         for c in self.extrafns:
   530         for c in self.extrafns:
   531             c(ctx, extra)
   531             c(ctx, extra)
   532         keepbranch = self.keepbranchesf and repo[p1].branch() != ctx.branch()
       
   533         destphase = max(ctx.phase(), phases.draft)
   532         destphase = max(ctx.phase(), phases.draft)
   534         overrides = {(b'phases', b'new-commit'): destphase}
   533         overrides = {(b'phases', b'new-commit'): destphase}
   535         if keepbranch:
       
   536             overrides[(b'ui', b'allowemptycommit')] = True
       
   537         with repo.ui.configoverride(overrides, b'rebase'):
   534         with repo.ui.configoverride(overrides, b'rebase'):
   538             if self.inmemory:
   535             if self.inmemory:
   539                 newnode = commitmemorynode(
   536                 newnode = commitmemorynode(
   540                     repo,
   537                     repo,
   541                     wctx=self.wctx,
   538                     wctx=self.wctx,