Show More
@@ -2084,13 +2084,13 b' def clone(ui, source, dest=None, **opts)' | |||
|
2084 | 2084 | except error.RepoError: |
|
2085 | 2085 | pass |
|
2086 | 2086 | ui.note(_('cloning main repository\n')) |
|
2087 | sr, dr = hg.clone(ui, sr.url(), dest, | |
|
2087 | sr, dr = hg.clone(ui, opts, sr.url(), dest, | |
|
2088 | 2088 | pull=opts.get('pull'), |
|
2089 | 2089 | rev=destrev, |
|
2090 | 2090 | update=False, |
|
2091 | 2091 | stream=opts.get('uncompressed')) |
|
2092 | 2092 | ui.note(_('cloning patch repository\n')) |
|
2093 | hg.clone(ui, opts.get('patches') or patchdir(sr), patchdir(dr), | |
|
2093 | hg.clone(ui, opts, opts.get('patches') or patchdir(sr), patchdir(dr), | |
|
2094 | 2094 | pull=opts.get('pull'), update=not opts.get('noupdate'), |
|
2095 | 2095 | stream=opts.get('uncompressed')) |
|
2096 | 2096 | if dr.local(): |
@@ -1026,7 +1026,7 b' def clone(ui, source, dest=None, **opts)' | |||
|
1026 | 1026 | if opts.get('noupdate') and opts.get('updaterev'): |
|
1027 | 1027 | raise util.Abort(_("cannot specify both --noupdate and --updaterev")) |
|
1028 | 1028 | |
|
1029 |
r = hg.clone( |
|
|
1029 | r = hg.clone(ui, opts, source, dest, | |
|
1030 | 1030 | pull=opts.get('pull'), |
|
1031 | 1031 | stream=opts.get('uncompressed'), |
|
1032 | 1032 | rev=opts.get('rev'), |
@@ -169,7 +169,7 b' def share(ui, source, dest=None, update=' | |||
|
169 | 169 | continue |
|
170 | 170 | _update(r, uprev) |
|
171 | 171 | |
|
172 | def clone(ui, source, dest=None, pull=False, rev=None, update=True, | |
|
172 | def clone(ui, opts, source, dest=None, pull=False, rev=None, update=True, | |
|
173 | 173 | stream=False, branch=None): |
|
174 | 174 | """Make a copy of an existing repository. |
|
175 | 175 | |
@@ -209,7 +209,7 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
209 | 209 | if isinstance(source, str): |
|
210 | 210 | origsource = ui.expandpath(source) |
|
211 | 211 | source, branch = parseurl(origsource, branch) |
|
212 | srcrepo = repository(ui, source) | |
|
212 | srcrepo = repository(remoteui(ui, opts), source) | |
|
213 | 213 | else: |
|
214 | 214 | srcrepo = source |
|
215 | 215 | branch = (None, branch or []) |
@@ -303,12 +303,12 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
303 | 303 | |
|
304 | 304 | # we need to re-init the repo after manually copying the data |
|
305 | 305 | # into it |
|
306 | destrepo = repository(ui, dest) | |
|
306 | destrepo = repository(remoteui(ui, opts), dest) | |
|
307 | 307 | srcrepo.hook('outgoing', source='clone', |
|
308 | 308 | node=node.hex(node.nullid)) |
|
309 | 309 | else: |
|
310 | 310 | try: |
|
311 | destrepo = repository(ui, dest, create=True) | |
|
311 | destrepo = repository(remoteui(ui, opts), dest, create=True) | |
|
312 | 312 | except OSError, inst: |
|
313 | 313 | if inst.errno == errno.EEXIST: |
|
314 | 314 | dircleanup.close() |
@@ -443,8 +443,8 b' class hgsubrepo(abstractsubrepo):' | |||
|
443 | 443 | % (subrelpath(self), srcurl)) |
|
444 | 444 | parentrepo = self._repo._subparent |
|
445 | 445 | shutil.rmtree(self._repo.root) |
|
446 | other, self._repo = hg.clone(self._repo._subparent.ui, other, | |
|
447 |
|
|
|
446 | other, self._repo = hg.clone(self._repo._subparent.ui, {}, other, | |
|
447 | self._repo.root, update=False) | |
|
448 | 448 | self._initrepo(parentrepo, source, create=True) |
|
449 | 449 | else: |
|
450 | 450 | self._repo.ui.status(_('pulling subrepo %s from %s\n') |
@@ -433,7 +433,7 b' iterable in addbranchrevs()' | |||
|
433 | 433 | > from mercurial import ui, hg |
|
434 | 434 | > myui = ui.ui() |
|
435 | 435 | > repo = hg.repository(myui, 'a') |
|
436 | > hg.clone(myui, repo, dest="ua") | |
|
436 | > hg.clone(myui, {}, repo, dest="ua") | |
|
437 | 437 | > EOF |
|
438 | 438 | |
|
439 | 439 | $ python simpleclone.py |
@@ -446,7 +446,7 b' iterable in addbranchrevs()' | |||
|
446 | 446 | > from mercurial import ui, hg |
|
447 | 447 | > myui = ui.ui() |
|
448 | 448 | > repo = hg.repository(myui, 'a') |
|
449 | > hg.clone(myui, repo, dest="ua", branch=["stable",]) | |
|
449 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) | |
|
450 | 450 | > EOF |
|
451 | 451 | |
|
452 | 452 | $ python branchclone.py |
@@ -10,7 +10,7 b' if not hasattr(os, "symlink"):' | |||
|
10 | 10 | |
|
11 | 11 | # clone with symlink support |
|
12 | 12 | u = ui.ui() |
|
13 | hg.clone(u, BUNDLEPATH, 'test0') | |
|
13 | hg.clone(u, {}, BUNDLEPATH, 'test0') | |
|
14 | 14 | |
|
15 | 15 | repo = hg.repository(u, 'test0') |
|
16 | 16 | |
@@ -39,4 +39,4 b' commands.status(u, repo)' | |||
|
39 | 39 | |
|
40 | 40 | # try cloning a repo which contains symlinks |
|
41 | 41 | u = ui.ui() |
|
42 | hg.clone(u, BUNDLEPATH, 'test1') | |
|
42 | hg.clone(u, {}, BUNDLEPATH, 'test1') |
General Comments 0
You need to be logged in to leave comments.
Login now