D3855: rebase: extract dryrun as a function

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Fri Jun 29 09:03:37 EDT 2018


yuja added a comment.


  >   rbsrt = rebaseruntime(repo, ui, inmemory, opts)
  >   with repo.wlock(), repo.lock():
  >       try:
  > 
  > - overrides = {('rebase', 'singletransaction'): True}
  > - with ui.configoverride(overrides, 'rebase'):
  > - _origrebase(ui, repo, inmemory=True, rbsrt=rbsrt,
  > - leaveunfinished=True, **opts) +                _dryrunrebase(ui, repo, rbsrt, **opts) except error.InMemoryMergeConflictsError: ui.status(_('hit a merge conflict\n')) return 1
  
  Oops, I meant the whole dryrun process could be extracted to a function
  because it's getting bigger.
  
    if dryrun:
        return _dryrunrebase(...)
    else:
        ...
  
  But feel free to ignore my suggestion if there's a reason to not move
  everything.

REPOSITORY
  rHG Mercurial

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

To: khanchi97, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list