Show More
@@ -587,8 +587,8 b' def clone(ui, source, dest=None, **opts)' | |||||
587 | repo = hg.repository(ui, dest, create=1) |
|
587 | repo = hg.repository(ui, dest, create=1) | |
588 | repo.pull(other) |
|
588 | repo.pull(other) | |
589 |
|
589 | |||
590 |
f = repo.opener("hgrc", " |
|
590 | f = repo.opener("hgrc", "a") | |
591 | f.write("[paths]\n") |
|
591 | f.write("\n[paths]\n") | |
592 | f.write("default = %s\n" % abspath) |
|
592 | f.write("default = %s\n" % abspath) | |
593 |
|
593 | |||
594 | if not opts['noupdate']: |
|
594 | if not opts['noupdate']: |
@@ -27,11 +27,6 b' class localrepository:' | |||||
27 |
|
27 | |||
28 | self.root = os.path.abspath(path) |
|
28 | self.root = os.path.abspath(path) | |
29 | self.ui = ui |
|
29 | self.ui = ui | |
30 |
|
||||
31 | if create: |
|
|||
32 | os.mkdir(self.path) |
|
|||
33 | os.mkdir(self.join("data")) |
|
|||
34 |
|
||||
35 | self.opener = util.opener(self.path) |
|
30 | self.opener = util.opener(self.path) | |
36 | self.wopener = util.opener(self.root) |
|
31 | self.wopener = util.opener(self.root) | |
37 | self.manifest = manifest.manifest(self.opener) |
|
32 | self.manifest = manifest.manifest(self.opener) | |
@@ -39,6 +34,13 b' class localrepository:' | |||||
39 | self.tagscache = None |
|
34 | self.tagscache = None | |
40 | self.nodetagscache = None |
|
35 | self.nodetagscache = None | |
41 |
|
36 | |||
|
37 | if create: | |||
|
38 | os.mkdir(self.path) | |||
|
39 | os.mkdir(self.join("data")) | |||
|
40 | f = self.opener("hgrc", "w") | |||
|
41 | f.write("[web]\n") | |||
|
42 | f.write("contact = %s\n" % ui.shortuser(ui.username())) | |||
|
43 | ||||
42 | self.dirstate = dirstate.dirstate(self.opener, ui, self.root) |
|
44 | self.dirstate = dirstate.dirstate(self.opener, ui, self.root) | |
43 | try: |
|
45 | try: | |
44 | self.ui.readconfig(self.opener("hgrc")) |
|
46 | self.ui.readconfig(self.opener("hgrc")) |
General Comments 0
You need to be logged in to leave comments.
Login now