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