##// END OF EJS Templates
coal: fix some glitches in annotate header
coal: fix some glitches in annotate header

File last commit:

r6340:949e607a default
r6471:0c1ec0cd default
Show More
test-mq.out
486 lines | 11.0 KiB | text/plain | TextLexer
Vadim Gelfer
mq: add basic tests
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
Alexis S. L. Carvalho
Add a pointer to "hg -v help" to the bottom of hg help {,cmd} output...
r4315 list of commands:
Vadim Gelfer
mq: add basic tests
r2729
qapplied print the patches already applied
qclone clone main and patch repository at same time
qcommit commit changes in the queue repository
Thomas Arendsen Hein
Adjusted test to changed help output.
r2910 qdelete remove patches from queue
Vadim Gelfer
mq: add basic tests
r2729 qdiff diff of the current patch
Brendan Cully
New mq command qfold: Merge patches into the current patch....
r2748 qfold fold the named patches into the current patch
Bryan O'Sullivan
mq: add qgoto command.
r4432 qgoto push or pop patches until named patch is at top of stack
Vadim Gelfer
mq: new commands qselect, qguard...
r2821 qguard set or print guards for a patch
Brendan Cully
Add command qheader to display the header of a given patch.
r2747 qheader Print the header of the topmost or specified patch
Vadim Gelfer
mq: add basic tests
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
Brendan Cully
New self-explanatory command qrename.
r2750 qrename rename a patch
Vadim Gelfer
mq: add basic tests
r2729 qrestore restore the queue state saved by a rev
qsave save current queue state
Vadim Gelfer
mq: new commands qselect, qguard...
r2821 qselect set or print guarded patches to push
Vadim Gelfer
mq: add basic tests
r2729 qseries print the entire series file
qtop print the name of the current patch
qunapplied print the patches not yet applied
strip strip a revision and all later revs on the same branch
Alexis S. L. Carvalho
Add a pointer to "hg -v help" to the bottom of hg help {,cmd} output...
r4315
use "hg -v help mq" to show aliases and global options
Vadim Gelfer
mq: add basic tests
r2729 adding a
Adrian Buehlmann
clone: print "updating working directory" status message...
r6338 updating working directory
Vadim Gelfer
mq: do not allow to push from repo with patches applied
r2848 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Vadim Gelfer
mq: add basic tests
r2729 adding b/z
% qinit
% -R qinit
% qinit -c
A .hgignore
A series
Alexis S. L. Carvalho
mq: don't allow patches with some reserved names...
r5981 % qnew should refuse bad patch names
abort: "series" cannot be used as the name of a patch
abort: "status" cannot be used as the name of a patch
abort: "guards" cannot be used as the name of a patch
abort: ".hgignore" cannot be used as the name of a patch
Vadim Gelfer
mq: add basic tests
r2729 % qnew implies add
A .hgignore
A series
A test.patch
Alexis S. L. Carvalho
mq: qinit -c creates a repo even after a regular qinit
r4071 % qinit; qinit -c
.hgignore:
Alexis S. L. Carvalho
qinit -c: add ^\.hg and ^\.mq to .hgignore
r6034 ^\.hg
^\.mq
Alexis S. L. Carvalho
mq: qinit -c creates a repo even after a regular qinit
r4071 syntax: glob
status
guards
series:
abort: repository already exists!
% qinit; <stuff>; qinit -c
Alexis S. L. Carvalho
Merge with crew-stable
r4232 adding .hg/patches/A
adding .hg/patches/B
Alexis S. L. Carvalho
mq: qinit -c creates a repo even after a regular qinit
r4071 A .hgignore
A A
A B
A series
.hgignore:
status
bleh
series:
A
B
Patrick Mezard
mq: avoid qnew committing everything on invalid paths (issue 803)...
r5534 % qnew with uncommitted changes
abort: local changes found, refresh first
A somefile
% qnew with uncommitted changes and missing file (issue 803)
someotherfile: No such file or directory
A somefile
issue803.patch
Patch queue now empty
Vadim Gelfer
mq: add basic tests
r2729 % qnew -m
foo bar
% qrefresh
foo bar
diff -r xa
--- a/a
+++ b/a
Matt Mackall
diff: don't show function name by default...
r5863 @@ -1,1 +1,2 @@
Vadim Gelfer
mq: add basic tests
r2729 a
+a
Alexis S. L. Carvalho
fix qrefresh'ing an empty patch...
r4173 % empty qrefresh
revision:
patch:
foo bar
working dir diff:
--- a/a
+++ b/a
Matt Mackall
diff: don't show function name by default...
r5863 @@ -1,1 +1,2 @@
Alexis S. L. Carvalho
fix qrefresh'ing an empty patch...
r4173 a
+a
Vadim Gelfer
mq: add basic tests
r2729 % qpop
Patch queue now empty
% qpush
applying test.patch
Now at: test.patch
% pop/push outside repo
Patch queue now empty
applying test.patch
Now at: test.patch
% qrefresh in subdir
% pop/push -a in subdir
Patch queue now empty
applying test.patch
applying test2.patch
Now at: test2.patch
% qseries
test.patch
test2.patch
Alexis S. L. Carvalho
fix qseries -v when there are unapplied patches
r3681 Now at: test.patch
0 A test.patch: foo bar
1 U test2.patch:
applying test2.patch
Now at: test2.patch
Vadim Gelfer
mq: add basic tests
r2729 % qapplied
test.patch
test2.patch
% qtop
test2.patch
% qprev
test.patch
% qnext
All patches applied
% pop, qnext, qprev, qapplied
Now at: test.patch
test2.patch
Only one patch applied
test.patch
Vadim Gelfer
mq: test commit in repo with patches applied
r2846 % commit should fail
abort: cannot commit over an applied mq patch
Vadim Gelfer
mq: do not allow to push from repo with patches applied
r2848 % push should fail
pushing to ../../k
abort: source has mq patches applied
Vadim Gelfer
mq: add basic tests
r2729 % qunapplied
test2.patch
Thomas Arendsen Hein
Added tests for qpush/qpop with index.
r3081 % qpush/qpop with index
applying test2.patch
Now at: test2.patch
Now at: test.patch
applying test1b.patch
Now at: test1b.patch
applying test2.patch
Now at: test2.patch
Now at: test1b.patch
Now at: test.patch
applying test1b.patch
applying test2.patch
Now at: test2.patch
Vadim Gelfer
fix test output
r2852 % push should succeed
Patch queue now empty
pushing to ../../k
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
Alexis S. L. Carvalho
add some tests for qpush/qpop error codes
r4101 % qpush/qpop error codes
applying test.patch
applying test1b.patch
applying test2.patch
Now at: test2.patch
% pops all patches and succeeds
Patch queue now empty
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
Now at: test.patch
qpush succeeds
% pops a patch and succeeds
Patch queue now empty
qpop succeeds
% pushes up to test1b.patch and succeeds
applying test.patch
applying test1b.patch
Now at: test1b.patch
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
Now at: test.patch
qpop test.patch succeeds
% pushes all patches and succeeds
applying test1b.patch
applying test2.patch
Now at: test2.patch
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
all patches are currently applied
qpush test2.patch succeeds
Vadim Gelfer
mq: add basic tests
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)
Brendan Cully
Call patch.diff directly instead of printdiff - this also saves an...
r3027 % cd b; hg qrefresh
adding a
foo
diff -r cb9a9f314b8b a
--- a/a
+++ b/a
Matt Mackall
diff: don't show function name by default...
r5863 @@ -1,1 +1,2 @@
Brendan Cully
Call patch.diff directly instead of printdiff - this also saves an...
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
Brendan Cully
Test case for bdiff on buffer objects
r3334 % qpush failure
Patch queue now empty
applying foo
applying bar
Bryan O'Sullivan
Update test output to reflect small changes in patch chattiness.
r4901 file foo already exists
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
Brendan Cully
Test case for bdiff on buffer objects
r3334 patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
Errors during apply, please fix and refresh bar
Brendan Cully
mq: test case for issue399
r3464 ? foo
? foo.rej
Brendan Cully
mq: add qparent tag (first parent of qbase)
r4219 % mq tags
0 qparent
1 qbase foo
2 qtip bar tip
Alexis S. L. Carvalho
mqrepo: don't abort if the status file has an unknown node
r5979 % bad node in status
Now at: foo
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
abort: working directory revision is not qtip
Brendan Cully
Teach mq about git patches
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
Now at: new
applying copy
Now at: copy
diff --git a/new b/copy
copy from new
copy to copy
Alexis S. L. Carvalho
add --git option to qdiff
r3697 diff --git a/new b/copy
copy from new
copy to copy
Alexis S. L. Carvalho
qrefresh: fix handling of added files (including copies) in the slow path
r3699 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
Dirkjan Ochtman
warn about new heads on commit (issue842)
r6336 created new head
Alexis S. L. Carvalho
qrefresh: fix handling of added files (including copies) in the slow path
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
Patch queue now empty
Matt Mackall
mq: warn when applying a patch to somewhere other than tip
r6340 (working directory not at tip)
Alexis S. L. Carvalho
qrefresh: fix handling of added files (including copies) in the slow path
r3699 applying bar
Now at: bar
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)
Alexis S. L. Carvalho
qrefresh: fix handling of copies in the fast path
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)
Bryan O'Sullivan
mq: autodetect an existing git patch during qrefresh (issue 491)
r4890 diff --git a/bar b/bar
diff --git a/foo b/baz
Alexis S. L. Carvalho
qrefresh: fix handling of added files (including copies) in the slow path
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
Patch queue now empty
Matt Mackall
mq: warn when applying a patch to somewhere other than tip
r6340 (working directory not at tip)
Alexis S. L. Carvalho
qrefresh: fix handling of added files (including copies) in the slow path
r3699 applying bar
Now at: bar
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)
Alexis S. L. Carvalho
qrefresh: fix handling of copies in the fast path
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)
Brendan Cully
mq: fix regression in 6fd953d5faea...
r5294 % refresh omitting an added file
C newfile
A newfile
Now at: bar
Patrick Mezard
Test qnew --git
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
Now at: addalexander
applying addbucephalus
Now at: addbucephalus
8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
Alexis S. L. Carvalho
fix strip'ping the second parent of a merge
r4065 % strip again
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Dirkjan Ochtman
warn about new heads on commit (issue842)
r6336 created new head
Alexis S. L. Carvalho
fix strip'ping the second parent of a merge
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
Alexis S. L. Carvalho
qclone: don't call reposetup manually
r4090 % qclone
Brendan Cully
mq: improve qclone error handling when patch directory is not a repository.
r4862 abort: versioned patch repository not found (see qinit -c)
adding .hg/patches/patch1
Alexis S. L. Carvalho
qclone: don't call reposetup manually
r4090 main repo:
rev 1: change foo
rev 0: add foo
patch repo:
rev 0: checkpoint
Adrian Buehlmann
clone: print "updating working directory" status message...
r6338 updating working directory
Alexis S. L. Carvalho
qclone: don't call reposetup manually
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
Patch queue now empty
main repo:
rev 0: add foo
patch repo:
rev 0: checkpoint
Adrian Buehlmann
clone: print "updating working directory" status message...
r6338 updating working directory
Alexis S. L. Carvalho
qclone: don't call reposetup manually
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
Patrick Mezard
patch: check filename is /dev/null for creation or deletion (issue 1033)...
r6280 % test applying on an empty file (issue 1033)
adding a
Patch queue now empty
applying changea
Now at: changea