changeset 1102:c81d264cd17d

localrepo: minor opener usage restructuring
author mpm@selenic.com
date Sat, 27 Aug 2005 16:34:54 -0700
parents 2cf5c8a4eae5
children 808a9f0e7af0
files mercurial/hg.py mercurial/localrepo.py mercurial/util.py
diffstat 3 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Sat Aug 27 16:28:53 2005 -0700
+++ b/mercurial/hg.py	Sat Aug 27 16:34:54 2005 -0700
@@ -5,7 +5,6 @@
 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
 
-import util
 from node import *
 from repo import *
 from demandload import *
@@ -26,4 +25,4 @@
         if path.startswith("ssh://"):
             return sshrepo.sshrepository(ui, path)
 
-    return localrepo.localrepository(ui, util.opener, path, create)
+    return localrepo.localrepository(ui, path, create)
--- a/mercurial/localrepo.py	Sat Aug 27 16:28:53 2005 -0700
+++ b/mercurial/localrepo.py	Sat Aug 27 16:34:54 2005 -0700
@@ -12,7 +12,7 @@
 demandload(globals(), "re lock transaction tempfile stat mdiff")
 
 class localrepository:
-    def __init__(self, ui, opener, path=None, create=0):
+    def __init__(self, ui, path=None, create=0):
         if not path:
             p = os.getcwd()
             while not os.path.isdir(os.path.join(p, ".hg")):
@@ -32,8 +32,8 @@
             os.mkdir(self.path)
             os.mkdir(self.join("data"))
 
-        self.opener = opener(self.path)
-        self.wopener = opener(self.root)
+        self.opener = util.opener(self.path)
+        self.wopener = util.opener(self.root)
         self.manifest = manifest.manifest(self.opener)
         self.changelog = changelog.changelog(self.opener)
         self.tagscache = None
--- a/mercurial/util.py	Sat Aug 27 16:28:53 2005 -0700
+++ b/mercurial/util.py	Sat Aug 27 16:34:54 2005 -0700
@@ -238,8 +238,6 @@
 
     this function is used to hide the details of COW semantics and
     remote file access from higher level code.
-
-    todo: separate remote file access into a separate function
     """
     p = base
     def o(path, mode="r"):