Show More
@@ -16,7 +16,6 b' directory. Applied patches are both patc' | |||||
16 |
|
16 | |||
17 | Common tasks (use "hg help command" for more details):: |
|
17 | Common tasks (use "hg help command" for more details):: | |
18 |
|
18 | |||
19 | prepare repository to work with patches qinit |
|
|||
20 | create new patch qnew |
|
19 | create new patch qnew | |
21 | import existing patch qimport |
|
20 | import existing patch qimport | |
22 |
|
21 | |||
@@ -1850,7 +1849,7 b' def clone(ui, source, dest=None, **opts)' | |||||
1850 | default. Use -p <url> to change. |
|
1849 | default. Use -p <url> to change. | |
1851 |
|
1850 | |||
1852 | The patch directory must be a nested Mercurial repository, as |
|
1851 | The patch directory must be a nested Mercurial repository, as | |
1853 |
would be created by |
|
1852 | would be created by init --mq. | |
1854 | ''' |
|
1853 | ''' | |
1855 | def patchdir(repo): |
|
1854 | def patchdir(repo): | |
1856 | url = repo.url() |
|
1855 | url = repo.url() | |
@@ -1868,7 +1867,7 b' def clone(ui, source, dest=None, **opts)' | |||||
1868 | hg.repository(ui, patchespath) |
|
1867 | hg.repository(ui, patchespath) | |
1869 | except error.RepoError: |
|
1868 | except error.RepoError: | |
1870 | raise util.Abort(_('versioned patch repository not found' |
|
1869 | raise util.Abort(_('versioned patch repository not found' | |
1871 |
' (see |
|
1870 | ' (see init --mq)')) | |
1872 | qbase, destrev = None, None |
|
1871 | qbase, destrev = None, None | |
1873 | if sr.local(): |
|
1872 | if sr.local(): | |
1874 | if sr.mq.applied: |
|
1873 | if sr.mq.applied: | |
@@ -2604,7 +2603,16 b' def mqinit(orig, ui, *args, **kwargs):' | |||||
2604 | if not mq: |
|
2603 | if not mq: | |
2605 | return orig(ui, *args, **kwargs) |
|
2604 | return orig(ui, *args, **kwargs) | |
2606 |
|
2605 | |||
2607 | repopath = cmdutil.findrepo(os.getcwd()) |
|
2606 | if args: | |
|
2607 | repopath = args[0] | |||
|
2608 | if not hg.islocal(repopath): | |||
|
2609 | raise util.Abort(_('only a local queue repository ' | |||
|
2610 | 'may be initialized')) | |||
|
2611 | else: | |||
|
2612 | repopath = cmdutil.findrepo(os.getcwd()) | |||
|
2613 | if not repopath: | |||
|
2614 | raise util.Abort(_('There is no Mercurial repository here ' | |||
|
2615 | '(.hg not found)')) | |||
2608 | repo = hg.repository(ui, repopath) |
|
2616 | repo = hg.repository(ui, repopath) | |
2609 | return qinit(ui, repo, True) |
|
2617 | return qinit(ui, repo, True) | |
2610 |
|
2618 |
@@ -80,6 +80,19 b" echo ' series:'" | |||||
80 | cat .hg/patches/series |
|
80 | cat .hg/patches/series | |
81 | cd .. |
|
81 | cd .. | |
82 |
|
82 | |||
|
83 | echo '% init --mq without repo' | |||
|
84 | mkdir f | |||
|
85 | cd f | |||
|
86 | hg init --mq | |||
|
87 | cd .. | |||
|
88 | ||||
|
89 | echo '% init --mq with nonexistent directory' | |||
|
90 | hg init --mq nonexistentdir | |||
|
91 | ||||
|
92 | echo '% init --mq with bundle (non "local")' | |||
|
93 | hg -R a bundle --all a.bundle >/dev/null | |||
|
94 | hg init --mq a.bundle | |||
|
95 | ||||
83 | cd a |
|
96 | cd a | |
84 |
|
97 | |||
85 | hg qnew -m 'foo bar' test.patch |
|
98 | hg qnew -m 'foo bar' test.patch |
@@ -10,7 +10,6 b' Applied patches are both patch files and' | |||||
10 |
|
10 | |||
11 | Common tasks (use "hg help command" for more details): |
|
11 | Common tasks (use "hg help command" for more details): | |
12 |
|
12 | |||
13 | prepare repository to work with patches qinit |
|
|||
14 | create new patch qnew |
|
13 | create new patch qnew | |
15 | import existing patch qimport |
|
14 | import existing patch qimport | |
16 |
|
15 | |||
@@ -90,6 +89,12 b' bleh' | |||||
90 | series: |
|
89 | series: | |
91 | A |
|
90 | A | |
92 | B |
|
91 | B | |
|
92 | % init --mq without repo | |||
|
93 | abort: There is no Mercurial repository here (.hg not found) | |||
|
94 | % init --mq with nonexistent directory | |||
|
95 | abort: repository nonexistentdir not found! | |||
|
96 | % init --mq with bundle (non "local") | |||
|
97 | abort: only a local queue repository may be initialized | |||
93 | % qrefresh |
|
98 | % qrefresh | |
94 | foo bar |
|
99 | foo bar | |
95 |
|
100 | |||
@@ -513,7 +518,7 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
513 | summary: add foo |
|
518 | summary: add foo | |
514 |
|
519 | |||
515 | % qclone |
|
520 | % qclone | |
516 |
abort: versioned patch repository not found (see |
|
521 | abort: versioned patch repository not found (see init --mq) | |
517 | adding .hg/patches/patch1 |
|
522 | adding .hg/patches/patch1 | |
518 | main repo: |
|
523 | main repo: | |
519 | rev 1: change foo |
|
524 | rev 1: change foo |
General Comments 0
You need to be logged in to leave comments.
Login now