Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/mq.py @ 4852: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 |
comparison
equal
deleted
inserted
replaced
4851:01ba62729c60 | 4852:cba10652a901 |
---|---|
1476 applied in destination. If you clone remote repository, be sure | 1476 applied in destination. If you clone remote repository, be sure |
1477 before that it has no patches applied. | 1477 before that it has no patches applied. |
1478 | 1478 |
1479 Source patch repository is looked for in <src>/.hg/patches by | 1479 Source patch repository is looked for in <src>/.hg/patches by |
1480 default. Use -p <url> to change. | 1480 default. Use -p <url> to change. |
1481 | |
1482 The patch directory must be a nested mercurial repository, as | |
1483 would be created by qinit -c. | |
1481 ''' | 1484 ''' |
1482 cmdutil.setremoteconfig(ui, opts) | 1485 cmdutil.setremoteconfig(ui, opts) |
1483 if dest is None: | 1486 if dest is None: |
1484 dest = hg.defaultdest(source) | 1487 dest = hg.defaultdest(source) |
1485 sr = hg.repository(ui, ui.expandpath(source)) | 1488 sr = hg.repository(ui, ui.expandpath(source)) |
1489 patchdir = opts['patches'] or (sr.url() + '/.hg/patches') | |
1490 try: | |
1491 pr = hg.repository(ui, patchdir) | |
1492 except hg.RepoError: | |
1493 raise util.Abort(_('versioned patch repository not found' | |
1494 ' (see qinit -c)')) | |
1486 qbase, destrev = None, None | 1495 qbase, destrev = None, None |
1487 if sr.local(): | 1496 if sr.local(): |
1488 if sr.mq.applied: | 1497 if sr.mq.applied: |
1489 qbase = revlog.bin(sr.mq.applied[0].rev) | 1498 qbase = revlog.bin(sr.mq.applied[0].rev) |
1490 if not hg.islocal(dest): | 1499 if not hg.islocal(dest): |