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