Mercurial > public > mercurial-scm > hg-stable
diff hgext/mq.py @ 4862:cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Tue, 10 Jul 2007 09:52:32 -0700 |
parents | 2ececafa5859 |
children | bbdcacf7cef8 |
line wrap: on
line diff
--- a/hgext/mq.py Mon Jul 09 22:35:10 2007 -0700 +++ b/hgext/mq.py Tue Jul 10 09:52:32 2007 -0700 @@ -1478,11 +1478,20 @@ Source patch repository is looked for in <src>/.hg/patches by default. Use -p <url> to change. + + The patch directory must be a nested mercurial repository, as + would be created by qinit -c. ''' cmdutil.setremoteconfig(ui, opts) if dest is None: dest = hg.defaultdest(source) sr = hg.repository(ui, ui.expandpath(source)) + patchdir = opts['patches'] or (sr.url() + '/.hg/patches') + try: + pr = hg.repository(ui, patchdir) + except hg.RepoError: + raise util.Abort(_('versioned patch repository not found' + ' (see qinit -c)')) qbase, destrev = None, None if sr.local(): if sr.mq.applied: