Show More
@@ -177,7 +177,7 b' pypats = [' | |||
|
177 | 177 | "comparison with singleton, use 'is' or 'is not' instead"), |
|
178 | 178 | (r'^\s*(while|if) [01]:', |
|
179 | 179 | "use True/False for constant Boolean expression"), |
|
180 | (r'(?<!def)\s+hasattr', | |
|
180 | (r'(?:(?<!def)\s+|\()hasattr', | |
|
181 | 181 | 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), |
|
182 | 182 | (r'opener\([^)]*\).read\(', |
|
183 | 183 | "use opener.read() instead"), |
@@ -3308,7 +3308,7 b' def reposetup(ui, repo):' | |||
|
3308 | 3308 | repo._phasedefaults.append(mqphasedefaults) |
|
3309 | 3309 | |
|
3310 | 3310 | def mqimport(orig, ui, repo, *args, **kwargs): |
|
3311 | if (hasattr(repo, 'abortifwdirpatched') | |
|
3311 | if (util.safehasattr(repo, 'abortifwdirpatched') | |
|
3312 | 3312 | and not kwargs.get('no_commit', False)): |
|
3313 | 3313 | repo.abortifwdirpatched(_('cannot import over an applied patch'), |
|
3314 | 3314 | kwargs.get('force')) |
General Comments 0
You need to be logged in to leave comments.
Login now