[PATCH 2 of 2] commands: introduce `hg display`

Denis Laxalde denis.laxalde at logilab.fr
Mon Nov 7 05:03:51 EST 2016


Gregory Szorc a écrit :
> For the command name, we would have preferred `hg show` because it is
> shorter and not ambigious with any other core command. However, a
> number of people have created `hg show` as effectively an alias to
> `hg export`. And, some were concerned that Git users used to `git show`
> being equivalent to `hg export` would be confused by a `hg show` doing
> something different.

`git show` is not equivalent to `hg export`, quoting git-show(1):

        Shows one or more objects (blobs, trees, tags and commits).

        For commits it shows the log message and textual diff. It also
        presents the merge commit in a special format as produced by git
        diff-tree --cc.

        For tags, it shows the tag message and the referenced objects.

        For trees, it shows the names (equivalent to git ls-tree with
        --name-only).

        For plain blobs, it shows the plain contents.

So only the first case is equivalent to `hg export` (or probably more
`hg log -vpr`). Other cases are quite close to the "view" concept
introduced here, as far as I understand.

Then if a revision can be registered as a view, `hg show` could just be
a plain replacement to the aforementioned alias I guess.

Given this and the conflict with `hg diff`, could we reconsider
the command name?


-- 
Denis Laxalde
Logilab         http://www.logilab.fr


More information about the Mercurial-devel mailing list