D134: rebase: add config to move rebase into a single transaction

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Jul 18 15:29:52 UTC 2017


martinvonz added inline comments.

INLINE COMMENTS

> rebase.py:712-718
> +        singletr = ui.configbool('rebase', 'singletransaction')
> +        if singletr:
> +            tr = repo.transaction('rebase')
> +        else:
> +            tr = util.nullcontextmanager()
> +        with util.acceptintervention(tr):
> +            rbsrt._performrebase(tr if singletr else None)

acceptintervention() also accepts None (it's a little unexpected, I know, but also convenient), so this can probably be:

  tr = None
  if singletr:
      tr = repo.transaction('rebase')  
  with util.acceptintervention(tr):
      rbsrt._performrebase(tr)

Also get rid of nullcontextmanager() then of course

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D134

EMAIL PREFERENCES
  https://phab.mercurial-scm.org/settings/panel/emailpreferences/

To: durham, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list