[Commented On] D9554: diff: add --from and --to flags as clearer alternative to -r -r

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Thu Dec 10 04:45:57 UTC 2020


mharbison72 added a comment.


  I haven't followed all of the UI enhancement discussions; it looks familiar, so is this something planned for other commands (e.g. status, extdiff)?

INLINE COMMENTS

> commands.py:2548-2549
> +        repo = scmutil.unhidehashlikerevs(repo, [from_rev] + [to_rev], b'nowarn')
> +        ctx1 = scmutil.revsingle(repo, from_rev, None)
> +        ctx2 = scmutil.revsingle(repo, to_rev, None)
>      else:

Should this be something like `scmutil.revrange()`, and then raise an InputError here if what was passed isn't `len() == 1` for each?  It would avoid awkwardness like `--from a::b`.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D9554/new/

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

To: martinvonz, #hg-reviewers
Cc: mharbison72, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20201210/e951e203/attachment-0002.html>


More information about the Mercurial-patches mailing list