Show More
@@ -876,23 +876,27 def show(ui, repo, *args, **kwargs): | |||||
876 | ] |
|
876 | ] | |
877 | args, opts = parseoptions(ui, cmdoptions, args) |
|
877 | args, opts = parseoptions(ui, cmdoptions, args) | |
878 |
|
878 | |||
879 | cmd = Command('show') |
|
|||
880 | if opts.get('name_status'): |
|
879 | if opts.get('name_status'): | |
881 | if opts.get('pretty') == 'format:': |
|
880 | if opts.get('pretty') == 'format:': | |
882 | cmd = Command('stat') |
|
881 | cmd = Command('status') | |
883 |
cmd['--change'] = ' |
|
882 | cmd['--change'] = '.' | |
884 | else: |
|
883 | else: | |
885 | cmd = Command('log') |
|
884 | cmd = Command('log') | |
886 | cmd.append('--style status') |
|
885 | cmd.append('--style status') | |
887 |
cmd.append('-r |
|
886 | cmd.append('-r .') | |
888 | elif len(args) > 0: |
|
887 | elif len(args) > 0: | |
889 | if ispath(repo, args[0]): |
|
888 | if ispath(repo, args[0]): | |
890 |
cmd |
|
889 | cmd = Command('cat') | |
|
890 | else: | |||
|
891 | cmd = Command('export') | |||
891 | cmd.extend(args) |
|
892 | cmd.extend(args) | |
892 | if opts.get('unified'): |
|
893 | if opts.get('unified'): | |
893 | cmd.append('--config diff.unified=%d' % (opts['unified'],)) |
|
894 | cmd.append('--config diff.unified=%d' % (opts['unified'],)) | |
894 | elif opts.get('unified'): |
|
895 | elif opts.get('unified'): | |
|
896 | cmd = Command('export') | |||
895 | cmd.append('--config diff.unified=%d' % (opts['unified'],)) |
|
897 | cmd.append('--config diff.unified=%d' % (opts['unified'],)) | |
|
898 | else: | |||
|
899 | cmd = Command('export') | |||
896 |
|
900 | |||
897 | ui.status((str(cmd)), "\n") |
|
901 | ui.status((str(cmd)), "\n") | |
898 |
|
902 |
@@ -177,39 +177,39 githelp for reset, checking ~ in git bec | |||||
177 |
|
177 | |||
178 | githelp for git show --name-status |
|
178 | githelp for git show --name-status | |
179 | $ hg githelp -- git show --name-status |
|
179 | $ hg githelp -- git show --name-status | |
180 |
hg log --style status -r |
|
180 | hg log --style status -r . | |
181 |
|
181 | |||
182 | githelp for git show --pretty=format: --name-status |
|
182 | githelp for git show --pretty=format: --name-status | |
183 | $ hg githelp -- git show --pretty=format: --name-status |
|
183 | $ hg githelp -- git show --pretty=format: --name-status | |
184 |
hg stat --change |
|
184 | hg status --change . | |
185 |
|
185 | |||
186 | githelp for show with no arguments |
|
186 | githelp for show with no arguments | |
187 | $ hg githelp -- show |
|
187 | $ hg githelp -- show | |
188 |
hg |
|
188 | hg export | |
189 |
|
189 | |||
190 | githelp for show with a path |
|
190 | githelp for show with a path | |
191 | $ hg githelp -- show test_file |
|
191 | $ hg githelp -- show test_file | |
192 |
hg |
|
192 | hg cat test_file | |
193 |
|
193 | |||
194 | githelp for show with not a path: |
|
194 | githelp for show with not a path: | |
195 | $ hg githelp -- show rev |
|
195 | $ hg githelp -- show rev | |
196 |
hg |
|
196 | hg export rev | |
197 |
|
197 | |||
198 | githelp for show with many arguments |
|
198 | githelp for show with many arguments | |
199 | $ hg githelp -- show argone argtwo |
|
199 | $ hg githelp -- show argone argtwo | |
200 |
hg |
|
200 | hg export argone argtwo | |
201 | $ hg githelp -- show test_file argone argtwo |
|
201 | $ hg githelp -- show test_file argone argtwo | |
202 |
hg |
|
202 | hg cat test_file argone argtwo | |
203 |
|
203 | |||
204 | githelp for show with --unified options |
|
204 | githelp for show with --unified options | |
205 | $ hg githelp -- show --unified=10 |
|
205 | $ hg githelp -- show --unified=10 | |
206 |
hg |
|
206 | hg export --config diff.unified=10 | |
207 | $ hg githelp -- show -U100 |
|
207 | $ hg githelp -- show -U100 | |
208 |
hg |
|
208 | hg export --config diff.unified=100 | |
209 |
|
209 | |||
210 | githelp for show with a path and --unified |
|
210 | githelp for show with a path and --unified | |
211 | $ hg githelp -- show -U20 test_file |
|
211 | $ hg githelp -- show -U20 test_file | |
212 |
hg |
|
212 | hg cat test_file --config diff.unified=20 | |
213 |
|
213 | |||
214 | githelp for stash drop without name |
|
214 | githelp for stash drop without name | |
215 | $ hg githelp -- git stash drop |
|
215 | $ hg githelp -- git stash drop |
General Comments 0
You need to be logged in to leave comments.
Login now