test-mq.out
544 lines
| 12.3 KiB
| text/plain
|
TextLexer
/ tests / test-mq.out
|
r2729 | % help | ||
mq extension - patch management and development | ||||
This extension lets you work with a stack of patches in a Mercurial | ||||
repository. It manages two stacks of patches - all known patches, and | ||||
applied patches (subset of known patches). | ||||
Known patches are represented as patch files in the .hg/patches | ||||
directory. Applied patches are both patch files and changesets. | ||||
Common tasks (use "hg help command" for more details): | ||||
prepare repository to work with patches qinit | ||||
create new patch qnew | ||||
import existing patch qimport | ||||
print patch series qseries | ||||
print applied patches qapplied | ||||
print name of top applied patch qtop | ||||
add known patch to applied stack qpush | ||||
remove patch from applied stack qpop | ||||
refresh contents of top applied patch qrefresh | ||||
|
r4315 | list of commands: | ||
|
r2729 | |||
qapplied print the patches already applied | ||||
qclone clone main and patch repository at same time | ||||
qcommit commit changes in the queue repository | ||||
|
r2910 | qdelete remove patches from queue | ||
|
r6608 | qdiff diff of the current patch and subsequent modifications | ||
|
r6645 | qfinish move applied patches into repository history | ||
|
r2748 | qfold fold the named patches into the current patch | ||
|
r4432 | qgoto push or pop patches until named patch is at top of stack | ||
|
r2821 | qguard set or print guards for a patch | ||
|
r7598 | qheader print the header of the topmost or specified patch | ||
|
r2729 | qimport import a patch | ||
qinit init a new queue repository | ||||
qnew create a new patch | ||||
qnext print the name of the next patch | ||||
qpop pop the current patch off the stack | ||||
qprev print the name of the previous patch | ||||
qpush push the next patch onto the stack | ||||
qrefresh update the current patch | ||||
|
r2750 | qrename rename a patch | ||
|
r2729 | qrestore restore the queue state saved by a rev | ||
qsave save current queue state | ||||
|
r2821 | qselect set or print guarded patches to push | ||
|
r2729 | qseries print the entire series file | ||
qtop print the name of the current patch | ||||
qunapplied print the patches not yet applied | ||||
|
r6635 | strip strip a revision and all its descendants from the repository | ||
|
r4315 | |||
|
r7125 | enabled extensions: | ||
mq patch management and development | ||||
|
r4315 | use "hg -v help mq" to show aliases and global options | ||
|
r2729 | adding a | ||
|
r6338 | updating working directory | ||
|
r2848 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||
|
r2729 | adding b/z | ||
% qinit | ||||
% -R qinit | ||||
% qinit -c | ||||
A .hgignore | ||||
A series | ||||
|
r4071 | % qinit; qinit -c | ||
.hgignore: | ||||
|
r6034 | ^\.hg | ||
^\.mq | ||||
|
r4071 | syntax: glob | ||
status | ||||
guards | ||||
series: | ||||
abort: repository already exists! | ||||
% qinit; <stuff>; qinit -c | ||||
|
r4232 | adding .hg/patches/A | ||
adding .hg/patches/B | ||||
|
r4071 | A .hgignore | ||
A A | ||||
A B | ||||
A series | ||||
.hgignore: | ||||
status | ||||
bleh | ||||
series: | ||||
A | ||||
B | ||||
|
r2729 | % qrefresh | ||
foo bar | ||||
diff -r xa | ||||
--- a/a | ||||
+++ b/a | ||||
|
r5863 | @@ -1,1 +1,2 @@ | ||
|
r2729 | a | ||
+a | ||||
|
r4173 | % empty qrefresh | ||
revision: | ||||
patch: | ||||
foo bar | ||||
working dir diff: | ||||
--- a/a | ||||
+++ b/a | ||||
|
r5863 | @@ -1,1 +1,2 @@ | ||
|
r4173 | a | ||
+a | ||||
|
r2729 | % qpop | ||
|
r7627 | patch queue now empty | ||
|
r2729 | % qpush | ||
applying test.patch | ||||
|
r7627 | now at: test.patch | ||
|
r2729 | % pop/push outside repo | ||
|
r7627 | patch queue now empty | ||
|
r2729 | applying test.patch | ||
|
r7627 | now at: test.patch | ||
|
r2729 | % qrefresh in subdir | ||
% pop/push -a in subdir | ||||
|
r7627 | patch queue now empty | ||
|
r2729 | applying test.patch | ||
applying test2.patch | ||||
|
r7627 | now at: test2.patch | ||
|
r2729 | % qseries | ||
test.patch | ||||
test2.patch | ||||
|
r7627 | now at: test.patch | ||
|
r3681 | 0 A test.patch: foo bar | ||
1 U test2.patch: | ||||
applying test2.patch | ||||
|
r7627 | now at: test2.patch | ||
|
r2729 | % qapplied | ||
test.patch | ||||
test2.patch | ||||
% qtop | ||||
test2.patch | ||||
% qprev | ||||
test.patch | ||||
% qnext | ||||
|
r7627 | all patches applied | ||
|
r2729 | % pop, qnext, qprev, qapplied | ||
|
r7627 | now at: test.patch | ||
|
r2729 | test2.patch | ||
|
r7627 | only one patch applied | ||
|
r2729 | test.patch | ||
|
r2846 | % commit should fail | ||
abort: cannot commit over an applied mq patch | ||||
|
r2848 | % push should fail | ||
pushing to ../../k | ||||
abort: source has mq patches applied | ||||
|
r7142 | % import should fail | ||
abort: cannot import over an applied patch | ||||
|
r2729 | % qunapplied | ||
test2.patch | ||||
|
r3081 | % qpush/qpop with index | ||
applying test2.patch | ||||
|
r7627 | now at: test2.patch | ||
now at: test.patch | ||||
|
r3081 | applying test1b.patch | ||
|
r7627 | now at: test1b.patch | ||
|
r3081 | applying test2.patch | ||
|
r7627 | now at: test2.patch | ||
now at: test1b.patch | ||||
now at: test.patch | ||||
|
r3081 | applying test1b.patch | ||
applying test2.patch | ||||
|
r7627 | now at: test2.patch | ||
|
r2852 | % push should succeed | ||
|
r7627 | patch queue now empty | ||
|
r2852 | pushing to ../../k | ||
searching for changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 1 changes to 1 files | ||||
|
r4101 | % qpush/qpop error codes | ||
applying test.patch | ||||
applying test1b.patch | ||||
applying test2.patch | ||||
|
r7627 | now at: test2.patch | ||
|
r4101 | % pops all patches and succeeds | ||
|
r7627 | patch queue now empty | ||
|
r4101 | qpop -a succeeds | ||
% does nothing and succeeds | ||||
no patches applied | ||||
qpop -a succeeds | ||||
% fails - nothing else to pop | ||||
no patches applied | ||||
qpop fails | ||||
% pushes a patch and succeeds | ||||
applying test.patch | ||||
|
r7627 | now at: test.patch | ||
|
r4101 | qpush succeeds | ||
% pops a patch and succeeds | ||||
|
r7627 | patch queue now empty | ||
|
r4101 | qpop succeeds | ||
% pushes up to test1b.patch and succeeds | ||||
applying test.patch | ||||
applying test1b.patch | ||||
|
r7627 | now at: test1b.patch | ||
|
r4101 | qpush test1b.patch succeeds | ||
% does nothing and succeeds | ||||
qpush: test1b.patch is already at the top | ||||
qpush test1b.patch succeeds | ||||
% does nothing and succeeds | ||||
qpop: test1b.patch is already at the top | ||||
qpop test1b.patch succeeds | ||||
% fails - can't push to this patch | ||||
abort: cannot push to a previous patch: test.patch | ||||
qpush test.patch fails | ||||
% fails - can't pop to this patch | ||||
abort: patch test2.patch is not applied | ||||
qpop test2.patch fails | ||||
% pops up to test.patch and succeeds | ||||
|
r7627 | now at: test.patch | ||
|
r4101 | qpop test.patch succeeds | ||
% pushes all patches and succeeds | ||||
applying test1b.patch | ||||
applying test2.patch | ||||
|
r7627 | now at: test2.patch | ||
|
r4101 | qpush -a succeeds | ||
% does nothing and succeeds | ||||
all patches are currently applied | ||||
qpush -a succeeds | ||||
% fails - nothing else to push | ||||
patch series already fully applied | ||||
qpush fails | ||||
% does nothing and succeeds | ||||
|
r7398 | qpush: test2.patch is already at the top | ||
|
r4101 | qpush test2.patch succeeds | ||
|
r2729 | % strip | ||
adding x | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
saving bundle to | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 1 changes to 1 files | ||||
(run 'hg update' to get a working copy) | ||||
|
r6472 | % strip with local changes, should complain | ||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
abort: local changes found | ||||
% --force strip with local changes | ||||
0 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
saving bundle to | ||||
|
r3027 | % cd b; hg qrefresh | ||
adding a | ||||
foo | ||||
diff -r cb9a9f314b8b a | ||||
--- a/a | ||||
+++ b/a | ||||
|
r5863 | @@ -1,1 +1,2 @@ | ||
|
r3027 | a | ||
+a | ||||
diff -r cb9a9f314b8b b/f | ||||
--- /dev/null | ||||
+++ b/b/f | ||||
@@ -0,0 +1,1 @@ | ||||
+f | ||||
% hg qrefresh . | ||||
foo | ||||
diff -r cb9a9f314b8b b/f | ||||
--- /dev/null | ||||
+++ b/b/f | ||||
@@ -0,0 +1,1 @@ | ||||
+f | ||||
M a | ||||
|
r3334 | % qpush failure | ||
|
r7627 | patch queue now empty | ||
|
r3334 | applying foo | ||
applying bar | ||||
|
r4901 | file foo already exists | ||
|
r6952 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | ||
|
r3334 | patch failed, unable to continue (try -v) | ||
patch failed, rejects left in working dir | ||||
|
r7627 | errors during apply, please fix and refresh bar | ||
|
r3464 | ? foo | ||
? foo.rej | ||||
|
r4219 | % mq tags | ||
0 qparent | ||||
1 qbase foo | ||||
2 qtip bar tip | ||||
|
r5979 | % bad node in status | ||
|
r7627 | now at: foo | ||
|
r5979 | changeset: 0:cb9a9f314b8b | ||
mq status file refers to unknown node | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a | ||||
mq status file refers to unknown node | ||||
default 0:cb9a9f314b8b | ||||
|
r7621 | abort: trying to pop unknown node | ||
|
r2934 | new file | ||
diff --git a/new b/new | ||||
new file mode 100755 | ||||
--- /dev/null | ||||
+++ b/new | ||||
@@ -0,0 +1,1 @@ | ||||
+foo | ||||
copy file | ||||
diff --git a/new b/copy | ||||
copy from new | ||||
copy to copy | ||||
|
r7627 | now at: new | ||
|
r2934 | applying copy | ||
|
r7627 | now at: copy | ||
|
r2934 | diff --git a/new b/copy | ||
copy from new | ||||
copy to copy | ||||
|
r3697 | diff --git a/new b/copy | ||
copy from new | ||||
copy to copy | ||||
|
r3699 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||
|
r6336 | created new head | ||
|
r3699 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||
adding branch | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 1 changes to 1 files | ||||
|
r7627 | patch queue now empty | ||
|
r6340 | (working directory not at tip) | ||
|
r3699 | applying bar | ||
|
r7627 | now at: bar | ||
|
r3699 | diff --git a/bar b/bar | ||
new file mode 100644 | ||||
--- /dev/null | ||||
+++ b/bar | ||||
@@ -0,0 +1,1 @@ | ||||
+bar | ||||
diff --git a/foo b/baz | ||||
rename from foo | ||||
rename to baz | ||||
2 baz (foo) | ||||
|
r3700 | diff --git a/bar b/bar | ||
new file mode 100644 | ||||
--- /dev/null | ||||
+++ b/bar | ||||
@@ -0,0 +1,1 @@ | ||||
+bar | ||||
diff --git a/foo b/baz | ||||
rename from foo | ||||
rename to baz | ||||
2 baz (foo) | ||||
|
r4890 | diff --git a/bar b/bar | ||
diff --git a/foo b/baz | ||||
|
r3699 | |||
1 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
2 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
adding branch | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 1 changes to 1 files | ||||
|
r7627 | patch queue now empty | ||
|
r6340 | (working directory not at tip) | ||
|
r3699 | applying bar | ||
|
r7627 | now at: bar | ||
|
r3699 | diff --git a/foo b/bleh | ||
rename from foo | ||||
rename to bleh | ||||
diff --git a/quux b/quux | ||||
new file mode 100644 | ||||
--- /dev/null | ||||
+++ b/quux | ||||
@@ -0,0 +1,1 @@ | ||||
+bar | ||||
3 bleh (foo) | ||||
|
r3700 | diff --git a/foo b/barney | ||
rename from foo | ||||
rename to barney | ||||
diff --git a/fred b/fred | ||||
new file mode 100644 | ||||
--- /dev/null | ||||
+++ b/fred | ||||
@@ -0,0 +1,1 @@ | ||||
+bar | ||||
3 barney (foo) | ||||
|
r5294 | % refresh omitting an added file | ||
C newfile | ||||
A newfile | ||||
|
r7627 | now at: bar | ||
|
r5026 | % create a git patch | ||
diff --git a/alexander b/alexander | ||||
% create a git binary patch | ||||
8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | ||||
diff --git a/bucephalus b/bucephalus | ||||
% check binary patches can be popped and pushed | ||||
|
r7627 | now at: addalexander | ||
|
r5026 | applying addbucephalus | ||
|
r7627 | now at: addbucephalus | ||
|
r5026 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | ||
|
r4065 | % strip again | ||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
|
r6336 | created new head | ||
|
r4065 | merging foo | ||
0 files updated, 1 files merged, 0 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | ||||
changeset: 3:99615015637b | ||||
tag: tip | ||||
parent: 2:20cbbe65cff7 | ||||
parent: 1:d2871fc282d4 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: merge | ||||
changeset: 2:20cbbe65cff7 | ||||
parent: 0:53245c60e682 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: change foo 2 | ||||
changeset: 1:d2871fc282d4 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: change foo 1 | ||||
changeset: 0:53245c60e682 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: add foo | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
saving bundle to | ||||
saving bundle to | ||||
adding branch | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 1 changes to 1 files | ||||
changeset: 1:20cbbe65cff7 | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: change foo 2 | ||||
changeset: 0:53245c60e682 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: add foo | ||||
|
r4090 | % qclone | ||
|
r4862 | abort: versioned patch repository not found (see qinit -c) | ||
adding .hg/patches/patch1 | ||||
|
r4090 | main repo: | ||
rev 1: change foo | ||||
rev 0: add foo | ||||
patch repo: | ||||
rev 0: checkpoint | ||||
|
r6338 | updating working directory | ||
|
r4090 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
main repo: | ||||
rev 0: add foo | ||||
patch repo: | ||||
rev 0: checkpoint | ||||
|
r7627 | patch queue now empty | ||
|
r4090 | main repo: | ||
rev 0: add foo | ||||
patch repo: | ||||
rev 0: checkpoint | ||||
|
r6338 | updating working directory | ||
|
r4090 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
main repo: | ||||
rev 0: add foo | ||||
patch repo: | ||||
rev 0: checkpoint | ||||
|
r6280 | % test applying on an empty file (issue 1033) | ||
adding a | ||||
|
r7627 | patch queue now empty | ||
|
r6280 | applying changea | ||
|
r7627 | now at: changea | ||
|
r6554 | % test qpush with --force, issue1087 | ||
adding bye.txt | ||||
adding hello.txt | ||||
|
r7627 | patch queue now empty | ||
|
r6554 | % qpush should fail, local changes | ||
abort: local changes found, refresh first | ||||
% apply force, should not discard changes with empty patch | ||||
applying empty | ||||
|
r7042 | patch: **** Only garbage was found in the patch input. | ||
|
r6554 | patch failed, unable to continue (try -v) | ||
patch empty is empty | ||||
|
r7627 | now at: empty | ||
|
r6554 | diff -r bf5fc3f07a0a hello.txt | ||
--- a/hello.txt | ||||
+++ b/hello.txt | ||||
@@ -1,1 +1,2 @@ | ||||
hello | ||||
+world | ||||
diff -r 9ecee4f634e3 hello.txt | ||||
--- a/hello.txt | ||||
+++ b/hello.txt | ||||
@@ -1,1 +1,2 @@ | ||||
hello | ||||
+world | ||||
changeset: 1:bf5fc3f07a0a | ||||
tag: qtip | ||||
tag: tip | ||||
tag: empty | ||||
tag: qbase | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: imported patch empty | ||||
|
r7627 | patch queue now empty | ||
|
r6554 | % qpush should fail, local changes | ||
abort: local changes found, refresh first | ||||
% apply force, should discard changes in hello, but not bye | ||||
applying empty | ||||
|
r7627 | now at: empty | ||
|
r6554 | M bye.txt | ||
diff -r ba252371dbc1 bye.txt | ||||
--- a/bye.txt | ||||
+++ b/bye.txt | ||||
@@ -1,1 +1,2 @@ | ||||
bye | ||||
+universe | ||||
diff -r 9ecee4f634e3 bye.txt | ||||
--- a/bye.txt | ||||
+++ b/bye.txt | ||||
@@ -1,1 +1,2 @@ | ||||
bye | ||||
+universe | ||||
diff -r 9ecee4f634e3 hello.txt | ||||
--- a/hello.txt | ||||
+++ b/hello.txt | ||||
@@ -1,1 +1,3 @@ | ||||
hello | ||||
+world | ||||
+universe | ||||
|
r7621 | % test popping revisions not in working dir ancestry | ||
0 A empty | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
|
r7627 | patch queue now empty | ||