diff mercurial/localrepo.py @ 3448:6ca49c5fe268

Stop erroring out pull -r and clone -r if repository isn't local.
author Eric Hopper <hopper@omnifarious.org>
date Sat, 09 Sep 2006 18:25:07 -0700
parents e6045fc3cd50
children 27ebe4efe98e
line wrap: on
line diff
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -15,7 +15,7 @@ demandload(globals(), "re lock transacti
 demandload(globals(), "os revlog time util")
 
 class localrepository(repo.repository):
-    capabilities = ()
+    capabilities = ('lookup', 'changegroupsubset')
 
     def __del__(self):
         self.transhandle = None
@@ -1241,6 +1241,8 @@ class localrepository(repo.repository):
             if heads is None:
                 cg = remote.changegroup(fetch, 'pull')
             else:
+                if 'changegroupsubset' not in remote.capabilities:
+                    raise util.Abort(_("Partial pull cannot be done because other repository doesn't support changegroupsubset."))
                 cg = remote.changegroupsubset(fetch, heads, 'pull')
             return self.addchangegroup(cg, 'pull', remote.url())
         finally: