Mercurial > hg
comparison hgext/histedit.py @ 30983:d4825798818b
histedit: log the time taken to read in the commands list
If we're being fed an external command list from stdin (histedit --commands -),
then the time spent reading stdin is outside our control. Log it.
author | Simon Farnsworth <simonfar@fb.com> |
---|---|
date | Wed, 15 Feb 2017 13:34:06 -0800 |
parents | 7080652af6e6 |
children | f1b63ec4b987 |
comparison
equal
deleted
inserted
replaced
30982:08e6f4dac2ca | 30983:d4825798818b |
---|---|
990 return goaleditplan | 990 return goaleditplan |
991 return goalnew | 991 return goalnew |
992 | 992 |
993 def _readfile(ui, path): | 993 def _readfile(ui, path): |
994 if path == '-': | 994 if path == '-': |
995 return ui.fin.read() | 995 with ui.timeblockedsection('histedit'): |
996 return ui.fin.read() | |
996 else: | 997 else: |
997 with open(path, 'rb') as f: | 998 with open(path, 'rb') as f: |
998 return f.read() | 999 return f.read() |
999 | 1000 |
1000 def _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs): | 1001 def _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs): |