diff mercurial/bundlerepo.py @ 2673:109a22f5434a

hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks all repository classes now have url() method that returns url of repo.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 25 Jul 2006 13:50:32 -0700
parents f116ddea537f
children 386f04d6ecb3
line wrap: on
line diff
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -159,6 +159,10 @@ class bundlefilelog(bundlerevlog, filelo
 class bundlerepository(localrepo.localrepository):
     def __init__(self, ui, path, bundlename):
         localrepo.localrepository.__init__(self, ui, path)
+
+        self._url = 'bundle:' + bundlename
+        if path: self._url += '+' + path
+
         self.tempfile = None
         self.bundlefile = open(bundlename, "rb")
         header = self.bundlefile.read(6)
@@ -208,6 +212,9 @@ class bundlerepository(localrepo.localre
             for c in changegroup.chunkiter(self.bundlefile):
                 pass
 
+    def url(self):
+        return self._url
+
     def dev(self):
         return -1