Show More
@@ -27,7 +27,9 b' class monotone_source(converter_source, ' | |||||
27 | if not os.path.exists(os.path.join(path, '_MTN')): |
|
27 | if not os.path.exists(os.path.join(path, '_MTN')): | |
28 | # Could be a monotone repository (SQLite db file) |
|
28 | # Could be a monotone repository (SQLite db file) | |
29 | try: |
|
29 | try: | |
30 |
|
|
30 | f = file(path, 'rb') | |
|
31 | header = f.read(16) | |||
|
32 | f.close() | |||
31 | except: |
|
33 | except: | |
32 | header = '' |
|
34 | header = '' | |
33 | if header != 'SQLite format 3\x00': |
|
35 | if header != 'SQLite format 3\x00': |
@@ -44,7 +44,7 b' def walkrepodirs(dirstate, absroot):' | |||||
44 | def _explain_watch_limit(ui, dirstate, rootabs): |
|
44 | def _explain_watch_limit(ui, dirstate, rootabs): | |
45 | path = '/proc/sys/fs/inotify/max_user_watches' |
|
45 | path = '/proc/sys/fs/inotify/max_user_watches' | |
46 | try: |
|
46 | try: | |
47 |
limit = int(file(path) |
|
47 | limit = int(util.readfile(path)) | |
48 | except IOError, err: |
|
48 | except IOError, err: | |
49 | if err.errno != errno.ENOENT: |
|
49 | if err.errno != errno.ENOENT: | |
50 | raise |
|
50 | raise |
General Comments 0
You need to be logged in to leave comments.
Login now