hgext/largefiles/reposetup.py
changeset 18969 257afe5489d4
parent 18731 c2d079387b2c
child 19056 ac41bb76c737
--- a/hgext/largefiles/reposetup.py	Thu Mar 21 23:27:37 2013 +0100
+++ b/hgext/largefiles/reposetup.py	Wed Apr 10 02:27:35 2013 +0900
@@ -27,10 +27,11 @@
     if not repo.local():
         return proto.wirereposetup(ui, repo)
 
+    origclass = localrepo.localrepository
+    repoclass = repo.__class__
     for name in ('status', 'commitctx', 'commit', 'push'):
-        method = getattr(repo, name)
-        if (isinstance(method, types.FunctionType) and
-            method.func_name == 'wrap'):
+        if (getattr(origclass, name) != getattr(repoclass, name) or
+            isinstance(getattr(repo, name), types.FunctionType)):
             ui.warn(_('largefiles: repo method %r appears to have already been'
                     ' wrapped by another extension: '
                     'largefiles may behave incorrectly\n')