# HG changeset patch # User mpm@selenic.com # Date 1125185694 25200 # Node ID c81d264cd17d388cf0f27ed983fdda917901a438 # Parent 2cf5c8a4eae5dc70c375fe56cddf9d764934495a localrepo: minor opener usage restructuring diff -r 2cf5c8a4eae5 -r c81d264cd17d mercurial/hg.py --- 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) diff -r 2cf5c8a4eae5 -r c81d264cd17d mercurial/localrepo.py --- 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 diff -r 2cf5c8a4eae5 -r c81d264cd17d mercurial/util.py --- 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"):