changeset 6313:c5580db9c3aa

remoterepo: no longer needed All users already use repo.local() to test for local, which is false in the repository base class. statichttprepository never derived from this class anyway.
author Matt Mackall <mpm@selenic.com>
date Thu, 20 Mar 2008 11:12:35 -0500
parents 08800489257e
children 9a1c59283ad3
files mercurial/httprepo.py mercurial/remoterepo.py mercurial/sshrepo.py
diffstat 3 files changed, 12 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httprepo.py	Thu Mar 20 11:12:35 2008 -0500
+++ b/mercurial/httprepo.py	Thu Mar 20 11:12:35 2008 -0500
@@ -7,7 +7,6 @@
 # of the GNU General Public License, incorporated herein by reference.
 
 from node import bin, hex
-from remoterepo import remoterepository
 from i18n import _
 import repo, os, urllib, urllib2, urlparse, zlib, util, httplib
 import errno, keepalive, socket, changegroup
@@ -181,7 +180,7 @@
             l[i] = '%%%02X' % ord(c)
     return ''.join(l)
 
-class httprepository(remoterepository):
+class httprepository(repo.repository):
     def __init__(self, ui, path):
         self.path = path
         self.caps = None
--- a/mercurial/remoterepo.py	Thu Mar 20 11:12:35 2008 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# remoterepo - remote repository proxy classes for mercurial
-#
-# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
-#
-# This software may be used and distributed according to the terms
-# of the GNU General Public License, incorporated herein by reference.
-
-import repo
-
-class remoterepository(repo.repository):
-    pass
-
-class remotelock(object):
-    def __init__(self, repo):
-        self.repo = repo
-    def release(self):
-        self.repo.unlock()
-        self.repo = None
-    def __del__(self):
-        if self.repo:
-            self.release()
--- a/mercurial/sshrepo.py	Thu Mar 20 11:12:35 2008 -0500
+++ b/mercurial/sshrepo.py	Thu Mar 20 11:12:35 2008 -0500
@@ -6,11 +6,20 @@
 # of the GNU General Public License, incorporated herein by reference.
 
 from node import bin, hex
-from remoterepo import remotelock, remoterepository
 from i18n import _
 import repo, os, re, util
 
-class sshrepository(remoterepository):
+class remotelock(object):
+    def __init__(self, repo):
+        self.repo = repo
+    def release(self):
+        self.repo.unlock()
+        self.repo = None
+    def __del__(self):
+        if self.repo:
+            self.release()
+
+class sshrepository(repo.repository):
     def __init__(self, ui, path, create=0):
         self._url = path
         self.ui = ui