Mercurial > hg
changeset 15921:92e455f2866c
qclone: add a few comment and blank line
This help readability.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 18 Jan 2012 17:11:27 +0100 |
parents | 885e0c71db9b |
children | 23921c17299a |
files | hgext/mq.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Wed Jan 18 17:06:59 2012 +0100 +++ b/hgext/mq.py Wed Jan 18 17:11:27 2012 +0100 @@ -2055,13 +2055,18 @@ Return 0 on success. ''' def patchdir(repo): + """compute a patch repo url from a repo object""" url = repo.url() if url.endswith('/'): url = url[:-1] return url + '/.hg/patches' + + # main repo (destination and sources) if dest is None: dest = hg.defaultdest(source) sr = hg.repository(hg.remoteui(ui, opts), ui.expandpath(source)) + + # patches repo (source only) if opts.get('patches'): patchespath = ui.expandpath(opts.get('patches')) else: @@ -2084,16 +2089,19 @@ qbase = sr.lookup('qbase') except error.RepoError: pass + ui.note(_('cloning main repository\n')) sr, dr = hg.clone(ui, opts, sr.url(), dest, pull=opts.get('pull'), rev=destrev, update=False, stream=opts.get('uncompressed')) + ui.note(_('cloning patch repository\n')) hg.clone(ui, opts, opts.get('patches') or patchdir(sr), patchdir(dr), pull=opts.get('pull'), update=not opts.get('noupdate'), stream=opts.get('uncompressed')) + if dr.local(): if qbase: ui.note(_('stripping applied patches from destination '