# HG changeset patch # User Alexis S. L. Carvalho # Date 1188189875 10800 # Node ID 438ff951df70852719d3fb717b144fcf995aad2b # Parent 76c4cadb49fc0e9555078dbc0a204fa98a3a4ebc avoid double slash problem mentioned in issue695 diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1490,6 +1490,11 @@ def clone(ui, source, dest=None, **opts) Source patch repository is looked for in /.hg/patches by default. Use -p to change. ''' + def patchdir(repo): + url = repo.url() + if url.endswith('/'): + url = url[:-1] + return url + '/.hg/patches' cmdutil.setremoteconfig(ui, opts) if dest is None: dest = hg.defaultdest(source) @@ -1511,10 +1516,8 @@ def clone(ui, source, dest=None, **opts) update=False, stream=opts['uncompressed']) ui.note(_('cloning patch repo\n')) - spr, dpr = hg.clone(ui, opts['patches'] or (sr.url() + '/.hg/patches'), - dr.url() + '/.hg/patches', - pull=opts['pull'], - update=not opts['noupdate'], + spr, dpr = hg.clone(ui, opts['patches'] or patchdir(sr), patchdir(dr), + pull=opts['pull'], update=not opts['noupdate'], stream=opts['uncompressed']) if dr.local(): if qbase: