D5490: commit: remove ignore whitespace option on --interactive (issue6042)

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Jan 12 20:55:58 EST 2019


yuja added a comment.


  > - a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -237,6 +237,7 @@ def dorecord(ui, repo, commitfunc, cmdsuggest, backupall, filterfn, *pats, **opts): opts = pycompat.byteskwargs(opts) +    ignorews = opts.get('ignorews', False)
  
  It isn't nice to mix command options and internal flags. Instead, maybe we can
  first change `record()` to not call `commands.commit()`, and pass in `whitespace`
  option to `cmdutil.dorecord()`.
  
    def record(ui, repo, *pats, **opts):
        opts = pycompat.byteskwargs(opts)
        ...
        with repo.wlock(), repo.lock():
            ret = cmdutil.dorecord(ui, repo, commands.commit, ..., whitespace=True,
                                   pats, opts)
            ...
  
  And I don't think `ignorews` is good name. It doesn't mean whitespace is
  ignored.
  
  >   def qrefresh(origfn, ui, repo, *pats, **opts):
  >       if not opts[r'interactive']:
  > 
  > @@ -89,7 +89,7 @@
  > 
  >   1. backup all changed files cmdutil.dorecord(ui, repo, committomq, None, True,
  > - cmdutil.recordfilter, *pats, **opts) +                    cmdutil.recordfilter, *pats, ignorews=True, **opts)
  
  Perhaps, this one should be `ignorefs=False` since qrefresh has no diffwsopts.

REPOSITORY
  rHG Mercurial

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

To: navaneeth.suresh, #hg-reviewers
Cc: yuja, durin42, pulkit, mercurial-devel


More information about the Mercurial-devel mailing list