diff --git a/hgext/mq.py b/hgext/mq.py index 885e0c71db9bdf45f7c8939c52f5ef4b017dce2e_aGdleHQvbXEucHk=..92e455f2866cd51ac48866fd48c1587eb10bda1a_aGdleHQvbXEucHk= 100644 --- a/hgext/mq.py +++ b/hgext/mq.py @@ -2055,7 +2055,8 @@ 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' @@ -2058,7 +2059,9 @@ 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)) @@ -2062,6 +2065,8 @@ 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,9 +2089,10 @@ 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')) @@ -2087,10 +2093,11 @@ 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')) @@ -2093,7 +2100,8 @@ 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 '