Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
14944:e2c413bde8a5 | 14945:11aad09a6370 |
---|---|
34 | 34 |
35 Do not attempt any read operations on this repository while the | 35 Do not attempt any read operations on this repository while the |
36 command is running. (Both repositories will be locked against | 36 command is running. (Both repositories will be locked against |
37 writes.) | 37 writes.) |
38 """ | 38 """ |
39 if not hasattr(util, 'samefile') or not hasattr(util, 'samedevice'): | 39 if (not util.safehasattr(util, 'samefile') or |
40 not util.safehasattr(util, 'samedevice')): | |
40 raise util.Abort(_('hardlinks are not supported on this system')) | 41 raise util.Abort(_('hardlinks are not supported on this system')) |
41 src = hg.repository(ui, ui.expandpath(origin or 'default-relink', | 42 src = hg.repository(ui, ui.expandpath(origin or 'default-relink', |
42 origin or 'default')) | 43 origin or 'default')) |
43 if not src.local(): | 44 if not src.local(): |
44 raise util.Abort(_('must specify local origin repository')) | 45 raise util.Abort(_('must specify local origin repository')) |