Show More
@@ -2055,13 +2055,18 b' def clone(ui, source, dest=None, **opts)' | |||||
2055 | Return 0 on success. |
|
2055 | Return 0 on success. | |
2056 | ''' |
|
2056 | ''' | |
2057 | def patchdir(repo): |
|
2057 | def patchdir(repo): | |
|
2058 | """compute a patch repo url from a repo object""" | |||
2058 | url = repo.url() |
|
2059 | url = repo.url() | |
2059 | if url.endswith('/'): |
|
2060 | if url.endswith('/'): | |
2060 | url = url[:-1] |
|
2061 | url = url[:-1] | |
2061 | return url + '/.hg/patches' |
|
2062 | return url + '/.hg/patches' | |
|
2063 | ||||
|
2064 | # main repo (destination and sources) | |||
2062 | if dest is None: |
|
2065 | if dest is None: | |
2063 | dest = hg.defaultdest(source) |
|
2066 | dest = hg.defaultdest(source) | |
2064 | sr = hg.repository(hg.remoteui(ui, opts), ui.expandpath(source)) |
|
2067 | sr = hg.repository(hg.remoteui(ui, opts), ui.expandpath(source)) | |
|
2068 | ||||
|
2069 | # patches repo (source only) | |||
2065 | if opts.get('patches'): |
|
2070 | if opts.get('patches'): | |
2066 | patchespath = ui.expandpath(opts.get('patches')) |
|
2071 | patchespath = ui.expandpath(opts.get('patches')) | |
2067 | else: |
|
2072 | else: | |
@@ -2084,16 +2089,19 b' def clone(ui, source, dest=None, **opts)' | |||||
2084 | qbase = sr.lookup('qbase') |
|
2089 | qbase = sr.lookup('qbase') | |
2085 | except error.RepoError: |
|
2090 | except error.RepoError: | |
2086 | pass |
|
2091 | pass | |
|
2092 | ||||
2087 | ui.note(_('cloning main repository\n')) |
|
2093 | ui.note(_('cloning main repository\n')) | |
2088 | sr, dr = hg.clone(ui, opts, sr.url(), dest, |
|
2094 | sr, dr = hg.clone(ui, opts, sr.url(), dest, | |
2089 | pull=opts.get('pull'), |
|
2095 | pull=opts.get('pull'), | |
2090 | rev=destrev, |
|
2096 | rev=destrev, | |
2091 | update=False, |
|
2097 | update=False, | |
2092 | stream=opts.get('uncompressed')) |
|
2098 | stream=opts.get('uncompressed')) | |
|
2099 | ||||
2093 | ui.note(_('cloning patch repository\n')) |
|
2100 | ui.note(_('cloning patch repository\n')) | |
2094 | hg.clone(ui, opts, opts.get('patches') or patchdir(sr), patchdir(dr), |
|
2101 | hg.clone(ui, opts, opts.get('patches') or patchdir(sr), patchdir(dr), | |
2095 | pull=opts.get('pull'), update=not opts.get('noupdate'), |
|
2102 | pull=opts.get('pull'), update=not opts.get('noupdate'), | |
2096 | stream=opts.get('uncompressed')) |
|
2103 | stream=opts.get('uncompressed')) | |
|
2104 | ||||
2097 | if dr.local(): |
|
2105 | if dr.local(): | |
2098 | if qbase: |
|
2106 | if qbase: | |
2099 | ui.note(_('stripping applied patches from destination ' |
|
2107 | ui.note(_('stripping applied patches from destination ' |
General Comments 0
You need to be logged in to leave comments.
Login now