Show More
@@ -5,7 +5,6 b'' | |||||
5 | # This software may be used and distributed according to the terms |
|
5 | # This software may be used and distributed according to the terms | |
6 | # of the GNU General Public License, incorporated herein by reference. |
|
6 | # of the GNU General Public License, incorporated herein by reference. | |
7 |
|
7 | |||
8 | import util |
|
|||
9 | from node import * |
|
8 | from node import * | |
10 | from repo import * |
|
9 | from repo import * | |
11 | from demandload import * |
|
10 | from demandload import * | |
@@ -26,4 +25,4 b' def repository(ui, path=None, create=0):' | |||||
26 | if path.startswith("ssh://"): |
|
25 | if path.startswith("ssh://"): | |
27 | return sshrepo.sshrepository(ui, path) |
|
26 | return sshrepo.sshrepository(ui, path) | |
28 |
|
27 | |||
29 |
return localrepo.localrepository(ui, |
|
28 | return localrepo.localrepository(ui, path, create) |
@@ -12,7 +12,7 b' from demandload import *' | |||||
12 | demandload(globals(), "re lock transaction tempfile stat mdiff") |
|
12 | demandload(globals(), "re lock transaction tempfile stat mdiff") | |
13 |
|
13 | |||
14 | class localrepository: |
|
14 | class localrepository: | |
15 |
def __init__(self, ui |
|
15 | def __init__(self, ui, path=None, create=0): | |
16 | if not path: |
|
16 | if not path: | |
17 | p = os.getcwd() |
|
17 | p = os.getcwd() | |
18 | while not os.path.isdir(os.path.join(p, ".hg")): |
|
18 | while not os.path.isdir(os.path.join(p, ".hg")): | |
@@ -32,8 +32,8 b' class localrepository:' | |||||
32 | os.mkdir(self.path) |
|
32 | os.mkdir(self.path) | |
33 | os.mkdir(self.join("data")) |
|
33 | os.mkdir(self.join("data")) | |
34 |
|
34 | |||
35 | self.opener = opener(self.path) |
|
35 | self.opener = util.opener(self.path) | |
36 | self.wopener = opener(self.root) |
|
36 | self.wopener = util.opener(self.root) | |
37 | self.manifest = manifest.manifest(self.opener) |
|
37 | self.manifest = manifest.manifest(self.opener) | |
38 | self.changelog = changelog.changelog(self.opener) |
|
38 | self.changelog = changelog.changelog(self.opener) | |
39 | self.tagscache = None |
|
39 | self.tagscache = None |
@@ -238,8 +238,6 b' def opener(base):' | |||||
238 |
|
238 | |||
239 | this function is used to hide the details of COW semantics and |
|
239 | this function is used to hide the details of COW semantics and | |
240 | remote file access from higher level code. |
|
240 | remote file access from higher level code. | |
241 |
|
||||
242 | todo: separate remote file access into a separate function |
|
|||
243 | """ |
|
241 | """ | |
244 | p = base |
|
242 | p = base | |
245 | def o(path, mode="r"): |
|
243 | def o(path, mode="r"): |
General Comments 0
You need to be logged in to leave comments.
Login now