Show More
@@ -174,8 +174,8 b' def share(ui, source, dest=None, update=' | |||
|
174 | 174 | continue |
|
175 | 175 | _update(r, uprev) |
|
176 | 176 | |
|
177 |
def clone(ui, opts, source, dest=None, pull=False, rev=None, |
|
|
178 | stream=False, branch=None): | |
|
177 | def clone(ui, peeropts, source, dest=None, pull=False, rev=None, | |
|
178 | update=True, stream=False, branch=None): | |
|
179 | 179 | """Make a copy of an existing repository. |
|
180 | 180 | |
|
181 | 181 | Create a copy of an existing repository in a new directory. The |
@@ -214,7 +214,7 b' def clone(ui, opts, source, dest=None, p' | |||
|
214 | 214 | if isinstance(source, str): |
|
215 | 215 | origsource = ui.expandpath(source) |
|
216 | 216 | source, branch = parseurl(origsource, branch) |
|
217 | srcrepo = repository(remoteui(ui, opts), source) | |
|
217 | srcrepo = repository(remoteui(ui, peeropts), source) | |
|
218 | 218 | else: |
|
219 | 219 | srcrepo = source |
|
220 | 220 | branch = (None, branch or []) |
@@ -308,12 +308,13 b' def clone(ui, opts, source, dest=None, p' | |||
|
308 | 308 | |
|
309 | 309 | # we need to re-init the repo after manually copying the data |
|
310 | 310 | # into it |
|
311 | destrepo = repository(remoteui(ui, opts), dest) | |
|
311 | destrepo = repository(remoteui(ui, peeropts), dest) | |
|
312 | 312 | srcrepo.hook('outgoing', source='clone', |
|
313 | 313 | node=node.hex(node.nullid)) |
|
314 | 314 | else: |
|
315 | 315 | try: |
|
316 |
destrepo = repository(remoteui(ui, opts), dest, |
|
|
316 | destrepo = repository(remoteui(ui, peeropts), dest, | |
|
317 | create=True) | |
|
317 | 318 | except OSError, inst: |
|
318 | 319 | if inst.errno == errno.EEXIST: |
|
319 | 320 | dircleanup.close() |
General Comments 0
You need to be logged in to leave comments.
Login now