Show More
@@ -1478,11 +1478,20 b' def clone(ui, source, dest=None, **opts)' | |||||
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: |
@@ -368,10 +368,17 b' cd qclonesource' | |||||
368 | echo foo > foo |
|
368 | echo foo > foo | |
369 | hg add foo |
|
369 | hg add foo | |
370 | hg ci -m 'add foo' |
|
370 | hg ci -m 'add foo' | |
371 |
hg qinit |
|
371 | hg qinit | |
372 | hg qnew patch1 |
|
372 | hg qnew patch1 | |
373 | echo bar >> foo |
|
373 | echo bar >> foo | |
374 | hg qrefresh -m 'change foo' |
|
374 | hg qrefresh -m 'change foo' | |
|
375 | cd .. | |||
|
376 | ||||
|
377 | # repo with unversioned patch dir | |||
|
378 | hg qclone qclonesource failure | |||
|
379 | ||||
|
380 | cd qclonesource | |||
|
381 | hg qinit -c | |||
375 | hg qci -m checkpoint |
|
382 | hg qci -m checkpoint | |
376 | qlog |
|
383 | qlog | |
377 | cd .. |
|
384 | cd .. |
@@ -407,6 +407,8 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
407 | summary: add foo |
|
407 | summary: add foo | |
408 |
|
408 | |||
409 | % qclone |
|
409 | % qclone | |
|
410 | abort: versioned patch repository not found (see qinit -c) | |||
|
411 | adding .hg/patches/patch1 | |||
410 | main repo: |
|
412 | main repo: | |
411 | rev 1: change foo |
|
413 | rev 1: change foo | |
412 | rev 0: add foo |
|
414 | rev 0: add foo |
General Comments 0
You need to be logged in to leave comments.
Login now