Mercurial > public > mercurial-scm > hg-stable
diff hgext/relink.py @ 14945:11aad09a6370
hgext: replace uses of hasattr with util.safehasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 20:37:12 -0500 |
parents | 6c7283faa967 |
children | 67964cda8701 |
line wrap: on
line diff
--- a/hgext/relink.py Mon Jul 25 15:30:19 2011 -0500 +++ b/hgext/relink.py Mon Jul 25 20:37:12 2011 -0500 @@ -36,7 +36,8 @@ command is running. (Both repositories will be locked against writes.) """ - if not hasattr(util, 'samefile') or not hasattr(util, 'samedevice'): + if (not util.safehasattr(util, 'samefile') or + not util.safehasattr(util, 'samedevice')): raise util.Abort(_('hardlinks are not supported on this system')) src = hg.repository(ui, ui.expandpath(origin or 'default-relink', origin or 'default'))