> --- 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 @@
>  
>      # 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.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to