hgbook
diff en/examples/run-example @ 144:006bbad1f190
Add expected output files.
This makes it possible to spot changes in Mercurial's output and
behaviour over time.
This makes it possible to spot changes in Mercurial's output and
behaviour over time.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue Mar 06 21:44:56 2007 -0800 (2007-03-06) |
parents | 627effec9d4e |
children | 65f6f9d18fa1 |
line diff
1.1 --- a/en/examples/run-example Tue Mar 06 21:36:14 2007 -0800 1.2 +++ b/en/examples/run-example Tue Mar 06 21:44:56 2007 -0800 1.3 @@ -322,7 +322,13 @@ 1.4 if name.endswith('.out') or name.endswith('~'): continue 1.5 if name.endswith('.run'): continue 1.6 pathname = os.path.join(path, name) 1.7 - st = os.lstat(pathname) 1.8 + try: 1.9 + st = os.lstat(pathname) 1.10 + except OSError, err: 1.11 + # could be an output file that was removed while we ran 1.12 + if err.errno != errno.ENOENT: 1.13 + raise 1.14 + continue 1.15 if stat.S_ISREG(st.st_mode) and st.st_mode & 0111: 1.16 if example(pathname, verbose).run(): 1.17 errs += 1