D3873: rebase: refactor logic to read rebasestate in a separate function

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Mon Jul 2 08:45:36 EDT 2018


yuja added a comment.


  Queued, thanks.
  
  >   f = repo.vfs("rebasestate")
  >   for i, l in enumerate(f.read().splitlines()):
  >       if i == 0:
  > 
  > - originalwd = repo[l].rev() +                    data['originalwd'] = repo[l].rev()
  
  FWIW, I don't have any better idea to keep old hg not crash with new state
  file, other than:
  
  a. use separate file (e.g. "rebasestate2") and leave "rebasestate" in old
  
    format (or make it an empty file to trigger error.)
  
  b. abuse `repo[l].rev()` to abort with lookup error with somewhat descriptive
  
    message.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list