|
1 % help |
|
2 mq extension - patch management and development |
|
3 |
|
4 This extension lets you work with a stack of patches in a Mercurial |
|
5 repository. It manages two stacks of patches - all known patches, and |
|
6 applied patches (subset of known patches). |
|
7 |
|
8 Known patches are represented as patch files in the .hg/patches |
|
9 directory. Applied patches are both patch files and changesets. |
|
10 |
|
11 Common tasks (use "hg help command" for more details): |
|
12 |
|
13 prepare repository to work with patches qinit |
|
14 create new patch qnew |
|
15 import existing patch qimport |
|
16 |
|
17 print patch series qseries |
|
18 print applied patches qapplied |
|
19 print name of top applied patch qtop |
|
20 |
|
21 add known patch to applied stack qpush |
|
22 remove patch from applied stack qpop |
|
23 refresh contents of top applied patch qrefresh |
|
24 |
|
25 list of commands (use "hg help -v mq" to show aliases and global options): |
|
26 |
|
27 qapplied print the patches already applied |
|
28 qclone clone main and patch repository at same time |
|
29 qcommit commit changes in the queue repository |
|
30 qdelete remove a patch from the series file |
|
31 qdiff diff of the current patch |
|
32 qimport import a patch |
|
33 qinit init a new queue repository |
|
34 qnew create a new patch |
|
35 qnext print the name of the next patch |
|
36 qpop pop the current patch off the stack |
|
37 qprev print the name of the previous patch |
|
38 qpush push the next patch onto the stack |
|
39 qrefresh update the current patch |
|
40 qrestore restore the queue state saved by a rev |
|
41 qsave save current queue state |
|
42 qseries print the entire series file |
|
43 qtop print the name of the current patch |
|
44 qunapplied print the patches not yet applied |
|
45 qversion print the version number |
|
46 strip strip a revision and all later revs on the same branch |
|
47 adding a |
|
48 adding b/z |
|
49 % qinit |
|
50 % -R qinit |
|
51 % qinit -c |
|
52 A .hgignore |
|
53 A series |
|
54 % qnew implies add |
|
55 A .hgignore |
|
56 A series |
|
57 A test.patch |
|
58 % qnew -m |
|
59 foo bar |
|
60 % qrefresh |
|
61 foo bar |
|
62 |
|
63 diff -r xa |
|
64 --- a/a |
|
65 +++ b/a |
|
66 @@ -1,1 +1,2 @@ a |
|
67 a |
|
68 +a |
|
69 % qpop |
|
70 Patch queue now empty |
|
71 % qpush |
|
72 applying test.patch |
|
73 Now at: test.patch |
|
74 % pop/push outside repo |
|
75 Patch queue now empty |
|
76 applying test.patch |
|
77 Now at: test.patch |
|
78 % qrefresh in subdir |
|
79 % pop/push -a in subdir |
|
80 Patch queue now empty |
|
81 applying test.patch |
|
82 applying test2.patch |
|
83 Now at: test2.patch |
|
84 % qseries |
|
85 test.patch |
|
86 test2.patch |
|
87 % qapplied |
|
88 test.patch |
|
89 test2.patch |
|
90 % qtop |
|
91 test2.patch |
|
92 % qprev |
|
93 test.patch |
|
94 % qnext |
|
95 All patches applied |
|
96 % pop, qnext, qprev, qapplied |
|
97 Now at: test.patch |
|
98 test2.patch |
|
99 Only one patch applied |
|
100 test.patch |
|
101 % qunapplied |
|
102 test2.patch |
|
103 % strip |
|
104 adding x |
|
105 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
106 saving bundle to |
|
107 adding changesets |
|
108 adding manifests |
|
109 adding file changes |
|
110 added 1 changesets with 1 changes to 1 files |
|
111 (run 'hg update' to get a working copy) |