Show More
@@ -31,8 +31,16 b' class localrepository(repo.repository):' | |||||
31 | path = p |
|
31 | path = p | |
32 | self.path = os.path.join(path, ".hg") |
|
32 | self.path = os.path.join(path, ".hg") | |
33 |
|
33 | |||
34 |
if |
|
34 | if not os.path.isdir(self.path): | |
|
35 | if create: | |||
|
36 | if not os.path.exists(path): | |||
|
37 | os.mkdir(path) | |||
|
38 | os.mkdir(self.path) | |||
|
39 | os.mkdir(self.join("data")) | |||
|
40 | else: | |||
35 | raise repo.RepoError(_("repository %s not found") % path) |
|
41 | raise repo.RepoError(_("repository %s not found") % path) | |
|
42 | elif create: | |||
|
43 | raise repo.RepoError(_("repository %s already exists") % path) | |||
36 |
|
44 | |||
37 | self.root = os.path.abspath(path) |
|
45 | self.root = os.path.abspath(path) | |
38 | self.origroot = path |
|
46 | self.origroot = path | |
@@ -75,12 +83,6 b' class localrepository(repo.repository):' | |||||
75 | self.decodepats = None |
|
83 | self.decodepats = None | |
76 | self.transhandle = None |
|
84 | self.transhandle = None | |
77 |
|
85 | |||
78 | if create: |
|
|||
79 | if not os.path.exists(path): |
|
|||
80 | os.mkdir(path) |
|
|||
81 | os.mkdir(self.path) |
|
|||
82 | os.mkdir(self.join("data")) |
|
|||
83 |
|
||||
84 | self.dirstate = dirstate.dirstate(self.opener, self.ui, self.root) |
|
86 | self.dirstate = dirstate.dirstate(self.opener, self.ui, self.root) | |
85 |
|
87 | |||
86 | def url(self): |
|
88 | def url(self): |
General Comments 0
You need to be logged in to leave comments.
Login now