comparison hgext/githelp.py @ 35720:b3cf58487731

githelp: improve help for "reset" The previous help referenced a `hg reset`, which is a Facebook-ism. We convert that to `hg update`. We also recognize --soft. Differential Revision: https://phab.mercurial-scm.org/D1728
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 18 Dec 2017 21:09:08 -0800
parents a4cd8f527a7f
children f50067fbeead
comparison
equal deleted inserted replaced
35719:a4cd8f527a7f 35720:b3cf58487731
805 805
806 commit = convert(args[0] if len(args) > 0 else '.') 806 commit = convert(args[0] if len(args) > 0 else '.')
807 hard = opts.get('hard') 807 hard = opts.get('hard')
808 808
809 if opts.get('mixed'): 809 if opts.get('mixed'):
810 ui.status(_('NOTE: --mixed has no meaning since mercurial has no ' + 810 ui.status(_('NOTE: --mixed has no meaning since Mercurial has no '
811 'staging area\n\n')) 811 'staging area\n\n'))
812 812 if opts.get('soft'):
813 cmd = Command('reset') 813 ui.status(_('NOTE: --soft has no meaning since Mercurial has no '
814 'staging area\n\n'))
815
816 cmd = Command('update')
814 if hard: 817 if hard:
815 cmd.append('--clean') 818 cmd.append('--clean')
819
816 cmd.append(commit) 820 cmd.append(commit)
817 821
818 ui.status((str(cmd)), "\n") 822 ui.status((str(cmd)), "\n")
819 823
820 def revert(ui, repo, *args, **kwargs): 824 def revert(ui, repo, *args, **kwargs):