Mercurial > public > mercurial-scm > hg-stable
diff hgext/mq.py @ 16416:c3aedd526d53 stable
mq: replace hasattr() with util.safehasattr(), update check-code.py
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Fri, 13 Apr 2012 15:07:13 +0200 |
parents | 7ee8aa662937 |
children | 9b26d541e972 |
line wrap: on
line diff
--- a/hgext/mq.py Sun Apr 08 11:14:56 2012 +0200 +++ b/hgext/mq.py Fri Apr 13 15:07:13 2012 +0200 @@ -3308,7 +3308,7 @@ repo._phasedefaults.append(mqphasedefaults) def mqimport(orig, ui, repo, *args, **kwargs): - if (hasattr(repo, 'abortifwdirpatched') + if (util.safehasattr(repo, 'abortifwdirpatched') and not kwargs.get('no_commit', False)): repo.abortifwdirpatched(_('cannot import over an applied patch'), kwargs.get('force'))