Mercurial > hg
view tests/heredoctest.py @ 18600:8ba520003ae0
largefiles: make caching largefiles message more explicit
In some cases, caching largefiles may take a long time (if the user has
pulled a lot of new heads). This patch makes it more clear what is happening,
by showing the number of heads we are caching largefiles for.
author | Na'Tosha Bard <natosha@unity3d.com> |
---|---|
date | Sat, 09 Feb 2013 15:08:21 +0000 |
parents | 5635a4017061 |
children | 9599e86159ac |
line wrap: on
line source
import sys globalvars = {} localvars = {} lines = sys.stdin.readlines() while lines: l = lines.pop(0) if l.startswith('SALT'): print l[:-1] elif l.startswith('>>> '): snippet = l[4:] while lines and lines[0].startswith('... '): l = lines.pop(0) snippet += "\n" + l[4:] c = compile(snippet, '<heredoc>', 'single') try: exec c in globalvars, localvars except Exception, inst: print repr(inst)