hg show is a Facebook-ism. Reference functionality in core.
The logic here isn't terrific. But it is better than nothing.
durin42 | |
pulkit | |
krbullock |
hg-reviewers |
hg show is a Facebook-ism. Reference functionality in core.
The logic here isn't terrific. But it is better than nothing.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
I really like the extension added by the series. It will be nice one to have to help people who wanted to consider hg.
Added some inline comments which can be follow-ups if sounds good. There is also some inconsistency in output format which needs to be fixed.
How about having something like hg githelp concepts which can describe the basic difference between git and hg?
hgext/githelp.py | ||
---|---|---|
45 | Maybe HEAD~ => .^ will be better. | |
162 | We should add about how hg add is different from git add. | |
193 | We should align this with other messages. | |
350 | Maybe we should tell about hg update -C trick? |
In D1729#30292, @pulkit wrote:I really like the extension added by the series. It will be nice one to have to help people who wanted to consider hg.
Added some inline comments which can be follow-ups if sounds good. There is also some inconsistency in output format which needs to be fixed.
How about having something like hg githelp concepts which can describe the basic difference between git and hg?
I agree with these points! My immediate goal was getting the extension upstreamed near its current form. It still needs a bit of love.
With regards to the help section, I think hg help git should exist and should be a "Mercurial for Git Users" guide or something. It can inform users about the "githelp" extension.
Path | Packages | |||
---|---|---|---|---|
M | hgext/githelp.py (14 lines) | |||
M | tests/test-githelp.t (20 lines) |
NOTE: --soft has no meaning since Mercurial has no staging area | NOTE: --soft has no meaning since Mercurial has no staging area | ||||
hg update . | hg update . | ||||
$ hg githelp -- reset --hard HEAD | $ hg githelp -- reset --hard HEAD | ||||
hg update --clean . | hg update --clean . | ||||
githelp for git show --name-status | githelp for git show --name-status | ||||
$ hg githelp -- git show --name-status | $ hg githelp -- git show --name-status | ||||
hg log --style status -r tip | hg log --style status -r . | ||||
githelp for git show --pretty=format: --name-status | githelp for git show --pretty=format: --name-status | ||||
$ hg githelp -- git show --pretty=format: --name-status | $ hg githelp -- git show --pretty=format: --name-status | ||||
hg stat --change tip | hg status --change . | ||||
githelp for show with no arguments | githelp for show with no arguments | ||||
$ hg githelp -- show | $ hg githelp -- show | ||||
hg show | hg export | ||||
githelp for show with a path | githelp for show with a path | ||||
$ hg githelp -- show test_file | $ hg githelp -- show test_file | ||||
hg show . test_file | hg cat test_file | ||||
githelp for show with not a path: | githelp for show with not a path: | ||||
$ hg githelp -- show rev | $ hg githelp -- show rev | ||||
hg show rev | hg export rev | ||||
githelp for show with many arguments | githelp for show with many arguments | ||||
$ hg githelp -- show argone argtwo | $ hg githelp -- show argone argtwo | ||||
hg show argone argtwo | hg export argone argtwo | ||||
$ hg githelp -- show test_file argone argtwo | $ hg githelp -- show test_file argone argtwo | ||||
hg show . test_file argone argtwo | hg cat test_file argone argtwo | ||||
githelp for show with --unified options | githelp for show with --unified options | ||||
$ hg githelp -- show --unified=10 | $ hg githelp -- show --unified=10 | ||||
hg show --config diff.unified=10 | hg export --config diff.unified=10 | ||||
$ hg githelp -- show -U100 | $ hg githelp -- show -U100 | ||||
hg show --config diff.unified=100 | hg export --config diff.unified=100 | ||||
githelp for show with a path and --unified | githelp for show with a path and --unified | ||||
$ hg githelp -- show -U20 test_file | $ hg githelp -- show -U20 test_file | ||||
hg show . test_file --config diff.unified=20 | hg cat test_file --config diff.unified=20 | ||||
githelp for stash drop without name | githelp for stash drop without name | ||||
$ hg githelp -- git stash drop | $ hg githelp -- git stash drop | ||||
hg shelve -d <shelve name> | hg shelve -d <shelve name> | ||||
githelp for stash drop with name | githelp for stash drop with name | ||||
$ hg githelp -- git stash drop xyz | $ hg githelp -- git stash drop xyz | ||||
hg shelve -d xyz | hg shelve -d xyz |
Maybe HEAD~ => .^ will be better.