2006-07-29 22:14:32 +04:00
|
|
|
|
% help
|
2009-06-24 14:25:56 +04:00
|
|
|
|
mq extension - manage a stack of patches
|
2006-07-29 22:14:32 +04:00
|
|
|
|
|
|
|
|
|
This extension lets you work with a stack of patches in a Mercurial
|
2009-07-08 01:54:42 +04:00
|
|
|
|
repository. It manages two stacks of patches - all known patches, and applied
|
|
|
|
|
patches (subset of known patches).
|
2006-07-29 22:14:32 +04:00
|
|
|
|
|
2009-07-08 01:54:42 +04:00
|
|
|
|
Known patches are represented as patch files in the .hg/patches directory.
|
|
|
|
|
Applied patches are both patch files and changesets.
|
2006-07-29 22:14:32 +04:00
|
|
|
|
|
|
|
|
|
Common tasks (use "hg help command" for more details):
|
|
|
|
|
|
2009-08-02 19:17:17 +04:00
|
|
|
|
create new patch qnew
|
|
|
|
|
import existing patch qimport
|
2006-07-29 22:14:32 +04:00
|
|
|
|
|
2009-08-02 19:17:17 +04:00
|
|
|
|
print patch series qseries
|
|
|
|
|
print applied patches qapplied
|
2006-07-29 22:14:32 +04:00
|
|
|
|
|
2009-08-02 19:17:17 +04:00
|
|
|
|
add known patch to applied stack qpush
|
|
|
|
|
remove patch from applied stack qpop
|
|
|
|
|
refresh contents of top applied patch qrefresh
|
2006-07-29 22:14:32 +04:00
|
|
|
|
|
2010-01-01 23:21:34 +03:00
|
|
|
|
By default, mq will automatically use git patches when required to avoid
|
|
|
|
|
losing file mode changes, copy records, binary files or empty files creations
|
|
|
|
|
or deletions. This behaviour can be configured with:
|
|
|
|
|
|
|
|
|
|
[mq]
|
|
|
|
|
git = auto/keep/yes/no
|
|
|
|
|
|
|
|
|
|
If set to 'keep', mq will obey the [diff] section configuration while
|
|
|
|
|
preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
|
|
|
|
|
will override the [diff] section and always generate git or regular patches,
|
|
|
|
|
possibly losing data in the second case.
|
|
|
|
|
|
2010-05-31 01:24:10 +04:00
|
|
|
|
You will by default be managing a patch queue named "patches". You can create
|
|
|
|
|
other, independent patch queues with the "hg qqueue" command.
|
|
|
|
|
|
2007-04-07 11:27:55 +04:00
|
|
|
|
list of commands:
|
2006-07-29 22:14:32 +04:00
|
|
|
|
|
|
|
|
|
qapplied print the patches already applied
|
|
|
|
|
qclone clone main and patch repository at same time
|
2006-08-15 13:47:17 +04:00
|
|
|
|
qdelete remove patches from queue
|
2008-05-18 22:54:10 +04:00
|
|
|
|
qdiff diff of the current patch and subsequent modifications
|
2008-06-03 11:34:14 +04:00
|
|
|
|
qfinish move applied patches into repository history
|
2006-08-01 07:33:56 +04:00
|
|
|
|
qfold fold the named patches into the current patch
|
2007-05-09 00:10:27 +04:00
|
|
|
|
qgoto push or pop patches until named patch is at top of stack
|
2006-08-09 08:42:50 +04:00
|
|
|
|
qguard set or print guards for a patch
|
2009-01-03 19:15:15 +03:00
|
|
|
|
qheader print the header of the topmost or specified patch
|
2006-07-29 22:14:32 +04:00
|
|
|
|
qimport import a patch
|
|
|
|
|
qnew create a new patch
|
2009-09-15 01:39:24 +04:00
|
|
|
|
qnext print the name of the next patch
|
2006-07-29 22:14:32 +04:00
|
|
|
|
qpop pop the current patch off the stack
|
2009-09-15 01:39:24 +04:00
|
|
|
|
qprev print the name of the previous patch
|
2006-07-29 22:14:32 +04:00
|
|
|
|
qpush push the next patch onto the stack
|
2010-05-29 22:32:39 +04:00
|
|
|
|
qqueue manage multiple patch queues
|
2006-07-29 22:14:32 +04:00
|
|
|
|
qrefresh update the current patch
|
2006-08-01 21:55:06 +04:00
|
|
|
|
qrename rename a patch
|
2006-08-09 08:42:50 +04:00
|
|
|
|
qselect set or print guarded patches to push
|
2006-07-29 22:14:32 +04:00
|
|
|
|
qseries print the entire series file
|
2009-09-15 01:39:24 +04:00
|
|
|
|
qtop print the name of the current patch
|
2006-07-29 22:14:32 +04:00
|
|
|
|
qunapplied print the patches not yet applied
|
2010-05-01 21:34:49 +04:00
|
|
|
|
strip strip a changeset and all its descendants from the repository
|
2007-04-07 11:27:55 +04:00
|
|
|
|
|
|
|
|
|
use "hg -v help mq" to show aliases and global options
|
2006-07-29 22:14:32 +04:00
|
|
|
|
adding a
|
2009-10-17 01:57:34 +04:00
|
|
|
|
updating to branch default
|
2006-08-11 03:10:59 +04:00
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2006-07-29 22:14:32 +04:00
|
|
|
|
adding b/z
|
|
|
|
|
% qinit
|
|
|
|
|
% -R qinit
|
|
|
|
|
% qinit -c
|
|
|
|
|
A .hgignore
|
|
|
|
|
A series
|
2007-02-09 08:48:30 +03:00
|
|
|
|
% qinit; qinit -c
|
|
|
|
|
.hgignore:
|
2008-02-08 23:07:55 +03:00
|
|
|
|
^\.hg
|
|
|
|
|
^\.mq
|
2007-02-09 08:48:30 +03:00
|
|
|
|
syntax: glob
|
|
|
|
|
status
|
|
|
|
|
guards
|
|
|
|
|
series:
|
|
|
|
|
abort: repository already exists!
|
|
|
|
|
% qinit; <stuff>; qinit -c
|
2007-03-16 06:45:18 +03:00
|
|
|
|
adding .hg/patches/A
|
|
|
|
|
adding .hg/patches/B
|
2007-02-09 08:48:30 +03:00
|
|
|
|
A .hgignore
|
|
|
|
|
A A
|
|
|
|
|
A B
|
|
|
|
|
A series
|
|
|
|
|
.hgignore:
|
|
|
|
|
status
|
|
|
|
|
bleh
|
|
|
|
|
series:
|
|
|
|
|
A
|
|
|
|
|
B
|
2010-07-02 04:23:26 +04:00
|
|
|
|
% status --mq with color (issue2096)
|
|
|
|
|
[0;32;1mA .hgignore[0m
|
|
|
|
|
[0;32;1mA A[0m
|
|
|
|
|
[0;32;1mA B[0m
|
|
|
|
|
[0;32;1mA series[0m
|
2010-03-14 20:46:38 +03:00
|
|
|
|
% init --mq without repo
|
2010-08-30 00:37:58 +04:00
|
|
|
|
abort: there is no Mercurial repository here (.hg not found)
|
2010-03-15 22:52:22 +03:00
|
|
|
|
% init --mq with repo path
|
|
|
|
|
ok
|
2010-03-14 20:46:38 +03:00
|
|
|
|
% init --mq with nonexistent directory
|
|
|
|
|
abort: repository nonexistentdir not found!
|
|
|
|
|
% init --mq with bundle (non "local")
|
|
|
|
|
abort: only a local queue repository may be initialized
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% qrefresh
|
|
|
|
|
foo bar
|
|
|
|
|
|
|
|
|
|
diff -r xa
|
|
|
|
|
--- a/a
|
|
|
|
|
+++ b/a
|
2008-01-16 20:14:24 +03:00
|
|
|
|
@@ -1,1 +1,2 @@
|
2006-07-29 22:14:32 +04:00
|
|
|
|
a
|
|
|
|
|
+a
|
2007-03-11 04:03:23 +03:00
|
|
|
|
% empty qrefresh
|
|
|
|
|
revision:
|
|
|
|
|
patch:
|
|
|
|
|
foo bar
|
|
|
|
|
|
|
|
|
|
working dir diff:
|
|
|
|
|
--- a/a
|
|
|
|
|
+++ b/a
|
2008-01-16 20:14:24 +03:00
|
|
|
|
@@ -1,1 +1,2 @@
|
2007-03-11 04:03:23 +03:00
|
|
|
|
a
|
|
|
|
|
+a
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% qpop
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2009-07-16 18:39:42 +04:00
|
|
|
|
% qpush with dump of tag cache
|
|
|
|
|
.hg/tags.cache (pre qpush):
|
|
|
|
|
1
|
2009-07-16 18:41:19 +04:00
|
|
|
|
|
2006-07-29 22:14:32 +04:00
|
|
|
|
applying test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2009-07-16 18:39:42 +04:00
|
|
|
|
.hg/tags.cache (post qpush):
|
|
|
|
|
2
|
2009-07-16 18:41:19 +04:00
|
|
|
|
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% pop/push outside repo
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2006-07-29 22:14:32 +04:00
|
|
|
|
applying test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% qrefresh in subdir
|
|
|
|
|
% pop/push -a in subdir
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test2.patch
|
|
|
|
|
popping test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2006-07-29 22:14:32 +04:00
|
|
|
|
applying test.patch
|
|
|
|
|
applying test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test2.patch
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% qseries
|
|
|
|
|
test.patch
|
|
|
|
|
test2.patch
|
2009-11-18 00:16:41 +03:00
|
|
|
|
0 A test.patch: f...
|
|
|
|
|
1 A test2.patch:
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2006-11-19 22:01:59 +03:00
|
|
|
|
0 A test.patch: foo bar
|
|
|
|
|
1 U test2.patch:
|
2010-05-06 05:53:45 +04:00
|
|
|
|
mq: 1 applied, 1 unapplied
|
2006-11-19 22:01:59 +03:00
|
|
|
|
applying test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test2.patch
|
2010-05-06 05:53:45 +04:00
|
|
|
|
mq: 2 applied
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% qapplied
|
|
|
|
|
test.patch
|
|
|
|
|
test2.patch
|
2009-09-15 01:39:24 +04:00
|
|
|
|
% qtop
|
|
|
|
|
test2.patch
|
2009-08-19 14:50:46 +04:00
|
|
|
|
% prev
|
2006-07-29 22:14:32 +04:00
|
|
|
|
test.patch
|
2009-08-19 14:50:46 +04:00
|
|
|
|
% next
|
2009-01-03 19:15:21 +03:00
|
|
|
|
all patches applied
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2006-08-11 02:02:18 +04:00
|
|
|
|
% commit should fail
|
|
|
|
|
abort: cannot commit over an applied mq patch
|
2006-08-11 03:10:59 +04:00
|
|
|
|
% push should fail
|
|
|
|
|
pushing to ../../k
|
|
|
|
|
abort: source has mq patches applied
|
2008-10-19 00:22:29 +04:00
|
|
|
|
% import should fail
|
|
|
|
|
abort: cannot import over an applied patch
|
2009-11-16 22:31:08 +03:00
|
|
|
|
% import --no-commit should succeed
|
|
|
|
|
applying ../../import.diff
|
|
|
|
|
M a
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% qunapplied
|
|
|
|
|
test2.patch
|
2006-09-12 19:26:20 +04:00
|
|
|
|
% qpush/qpop with index
|
|
|
|
|
applying test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test2.patch
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test2.patch
|
|
|
|
|
popping test1b.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2006-09-12 19:26:20 +04:00
|
|
|
|
applying test1b.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test1b.patch
|
2006-09-12 19:26:20 +04:00
|
|
|
|
applying test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test2.patch
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test1b.patch
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test1b.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2006-09-12 19:26:20 +04:00
|
|
|
|
applying test1b.patch
|
|
|
|
|
applying test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test2.patch
|
2010-04-30 17:05:51 +04:00
|
|
|
|
% qpush --move
|
|
|
|
|
popping test2.patch
|
|
|
|
|
popping test1b.patch
|
|
|
|
|
popping test.patch
|
|
|
|
|
patch queue now empty
|
2010-07-10 23:23:00 +04:00
|
|
|
|
cannot push 'test2.patch' - guarded by ['+posguard']
|
|
|
|
|
number of unguarded, unapplied patches has changed from 2 to 3
|
2010-04-30 17:05:51 +04:00
|
|
|
|
applying test2.patch
|
|
|
|
|
now at: test2.patch
|
|
|
|
|
applying test1b.patch
|
|
|
|
|
now at: test1b.patch
|
|
|
|
|
applying test.patch
|
|
|
|
|
now at: test.patch
|
|
|
|
|
0 A test2.patch
|
|
|
|
|
1 A test1b.patch
|
|
|
|
|
2 A test.patch
|
|
|
|
|
popping test.patch
|
|
|
|
|
popping test1b.patch
|
|
|
|
|
popping test2.patch
|
|
|
|
|
patch queue now empty
|
2010-07-10 23:23:00 +04:00
|
|
|
|
guards deactivated
|
|
|
|
|
number of unguarded, unapplied patches has changed from 3 to 2
|
2010-04-30 17:05:51 +04:00
|
|
|
|
applying test.patch
|
|
|
|
|
now at: test.patch
|
|
|
|
|
applying test1b.patch
|
|
|
|
|
now at: test1b.patch
|
|
|
|
|
abort: patch bogus not in series
|
2010-07-10 23:23:00 +04:00
|
|
|
|
abort: please specify the patch to move
|
2010-04-30 17:05:51 +04:00
|
|
|
|
abort: cannot push to a previous patch: test.patch
|
|
|
|
|
applying test2.patch
|
|
|
|
|
now at: test2.patch
|
2010-07-10 23:23:00 +04:00
|
|
|
|
% series after move
|
|
|
|
|
test.patch
|
|
|
|
|
test1b.patch
|
|
|
|
|
test2.patch
|
|
|
|
|
# comment
|
|
|
|
|
|
2009-08-19 14:50:46 +04:00
|
|
|
|
% pop, qapplied, qunapplied
|
|
|
|
|
0 A test.patch
|
|
|
|
|
1 A test1b.patch
|
|
|
|
|
2 A test2.patch
|
|
|
|
|
% qapplied -1 test.patch
|
|
|
|
|
only one patch applied
|
|
|
|
|
% qapplied -1 test1b.patch
|
|
|
|
|
test.patch
|
|
|
|
|
% qapplied -1 test2.patch
|
|
|
|
|
test1b.patch
|
|
|
|
|
% qapplied -1
|
|
|
|
|
test1b.patch
|
|
|
|
|
% qapplied
|
|
|
|
|
test.patch
|
|
|
|
|
test1b.patch
|
|
|
|
|
test2.patch
|
|
|
|
|
% qapplied test1b.patch
|
|
|
|
|
test.patch
|
|
|
|
|
test1b.patch
|
|
|
|
|
% qunapplied -1
|
|
|
|
|
all patches applied
|
|
|
|
|
% qunapplied
|
|
|
|
|
% popping
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test2.patch
|
2009-08-19 14:50:46 +04:00
|
|
|
|
now at: test1b.patch
|
|
|
|
|
% qunapplied -1
|
|
|
|
|
test2.patch
|
|
|
|
|
% qunapplied
|
|
|
|
|
test2.patch
|
|
|
|
|
% qunapplied test2.patch
|
|
|
|
|
% qunapplied -1 test2.patch
|
|
|
|
|
all patches applied
|
|
|
|
|
% popping -a
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test1b.patch
|
|
|
|
|
popping test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2009-08-19 14:50:46 +04:00
|
|
|
|
% qapplied
|
|
|
|
|
% qapplied -1
|
|
|
|
|
no patches applied
|
|
|
|
|
applying test.patch
|
|
|
|
|
now at: test.patch
|
|
|
|
|
% push should succeed
|
|
|
|
|
popping test.patch
|
|
|
|
|
patch queue now empty
|
2006-08-11 04:37:57 +04:00
|
|
|
|
pushing to ../../k
|
|
|
|
|
searching for changes
|
|
|
|
|
adding changesets
|
|
|
|
|
adding manifests
|
|
|
|
|
adding file changes
|
|
|
|
|
added 1 changesets with 1 changes to 1 files
|
2007-02-17 09:50:06 +03:00
|
|
|
|
% qpush/qpop error codes
|
|
|
|
|
applying test.patch
|
|
|
|
|
applying test1b.patch
|
|
|
|
|
applying test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test2.patch
|
2007-02-17 09:50:06 +03:00
|
|
|
|
% pops all patches and succeeds
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test2.patch
|
|
|
|
|
popping test1b.patch
|
|
|
|
|
popping test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2007-02-17 09:50:06 +03:00
|
|
|
|
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
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2007-02-17 09:50:06 +03:00
|
|
|
|
qpush succeeds
|
|
|
|
|
% pops a patch and succeeds
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2007-02-17 09:50:06 +03:00
|
|
|
|
qpop succeeds
|
|
|
|
|
% pushes up to test1b.patch and succeeds
|
|
|
|
|
applying test.patch
|
|
|
|
|
applying test1b.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test1b.patch
|
2007-02-17 09:50:06 +03:00
|
|
|
|
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
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping test1b.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test.patch
|
2007-02-17 09:50:06 +03:00
|
|
|
|
qpop test.patch succeeds
|
|
|
|
|
% pushes all patches and succeeds
|
|
|
|
|
applying test1b.patch
|
|
|
|
|
applying test2.patch
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: test2.patch
|
2007-02-17 09:50:06 +03:00
|
|
|
|
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
|
2008-11-23 11:44:31 +03:00
|
|
|
|
qpush: test2.patch is already at the top
|
2007-02-17 09:50:06 +03:00
|
|
|
|
qpush test2.patch succeeds
|
2006-07-29 22:14:32 +04:00
|
|
|
|
% strip
|
|
|
|
|
adding x
|
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2010-05-20 21:15:44 +04:00
|
|
|
|
saved backup bundle to
|
2006-07-29 22:14:32 +04:00
|
|
|
|
adding changesets
|
|
|
|
|
adding manifests
|
|
|
|
|
adding file changes
|
|
|
|
|
added 1 changesets with 1 changes to 1 files
|
|
|
|
|
(run 'hg update' to get a working copy)
|
2008-04-04 19:44:31 +04:00
|
|
|
|
% 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
|
2009-05-19 05:59:58 +04:00
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2010-05-20 21:15:44 +04:00
|
|
|
|
saved backup bundle to
|
2006-08-30 04:08:55 +04:00
|
|
|
|
% cd b; hg qrefresh
|
|
|
|
|
adding a
|
|
|
|
|
foo
|
|
|
|
|
|
|
|
|
|
diff -r cb9a9f314b8b a
|
|
|
|
|
--- a/a
|
|
|
|
|
+++ b/a
|
2008-01-16 20:14:24 +03:00
|
|
|
|
@@ -1,1 +1,2 @@
|
2006-08-30 04:08:55 +04:00
|
|
|
|
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
|
2006-10-11 23:02:06 +04:00
|
|
|
|
% qpush failure
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping bar
|
|
|
|
|
popping foo
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2006-10-11 23:02:06 +04:00
|
|
|
|
applying foo
|
|
|
|
|
applying bar
|
2007-07-17 20:39:30 +04:00
|
|
|
|
file foo already exists
|
2008-08-31 18:12:02 +04:00
|
|
|
|
1 out of 1 hunks FAILED -- saving rejects to file foo.rej
|
2006-10-11 23:02:06 +04:00
|
|
|
|
patch failed, unable to continue (try -v)
|
|
|
|
|
patch failed, rejects left in working dir
|
2009-01-03 19:15:21 +03:00
|
|
|
|
errors during apply, please fix and refresh bar
|
2006-10-18 21:37:34 +04:00
|
|
|
|
? foo
|
|
|
|
|
? foo.rej
|
2007-03-14 20:45:18 +03:00
|
|
|
|
% mq tags
|
|
|
|
|
0 qparent
|
2010-04-26 23:58:36 +04:00
|
|
|
|
1 foo qbase
|
|
|
|
|
2 bar qtip tip
|
2008-02-04 02:03:46 +03:00
|
|
|
|
% bad node in status
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping bar
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: foo
|
2008-02-04 02:03:46 +03:00
|
|
|
|
changeset: 0:cb9a9f314b8b
|
|
|
|
|
tag: tip
|
|
|
|
|
user: test
|
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
|
summary: a
|
|
|
|
|
|
|
|
|
|
default 0:cb9a9f314b8b
|
2010-07-20 19:07:29 +04:00
|
|
|
|
no patches applied
|
2006-08-17 06:49:45 +04:00
|
|
|
|
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
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping copy
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: new
|
2006-08-17 06:49:45 +04:00
|
|
|
|
applying copy
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: copy
|
2006-08-17 06:49:45 +04:00
|
|
|
|
diff --git a/new b/copy
|
|
|
|
|
copy from new
|
|
|
|
|
copy to copy
|
2006-11-21 00:32:40 +03:00
|
|
|
|
diff --git a/new b/copy
|
|
|
|
|
copy from new
|
|
|
|
|
copy to copy
|
2009-12-29 18:00:24 +03:00
|
|
|
|
% test file addition in slow path
|
2006-11-21 00:32:42 +03:00
|
|
|
|
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
2008-03-21 13:06:02 +03:00
|
|
|
|
created new head
|
2006-11-21 00:32:42 +03:00
|
|
|
|
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
|
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)
|
2006-11-21 00:32:43 +03:00
|
|
|
|
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)
|
2007-07-17 03:50:47 +04:00
|
|
|
|
diff --git a/bar b/bar
|
|
|
|
|
diff --git a/foo b/baz
|
2009-12-29 18:00:24 +03:00
|
|
|
|
% test file move chains in the slow path
|
2006-11-21 00:32:42 +03:00
|
|
|
|
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
|
|
|
|
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
|
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)
|
2006-11-21 00:32:43 +03:00
|
|
|
|
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)
|
2007-09-11 02:00:05 +04:00
|
|
|
|
% refresh omitting an added file
|
2008-01-01 02:47:02 +03:00
|
|
|
|
C newfile
|
2007-09-11 02:00:05 +04:00
|
|
|
|
A newfile
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping baz
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: bar
|
2007-07-28 22:15:54 +04:00
|
|
|
|
% 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
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping addbucephalus
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: addalexander
|
2007-07-28 22:15:54 +04:00
|
|
|
|
applying addbucephalus
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: addbucephalus
|
2007-07-28 22:15:54 +04:00
|
|
|
|
8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
|
2007-02-06 20:54:58 +03:00
|
|
|
|
% strip again
|
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2008-03-21 13:06:02 +03:00
|
|
|
|
created new head
|
2007-02-06 20:54:58 +03:00
|
|
|
|
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
|
2010-05-20 21:15:44 +04:00
|
|
|
|
saved backup bundle to
|
2007-02-06 20:54:58 +03:00
|
|
|
|
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
|
|
|
|
|
|
2007-02-15 13:44:08 +03:00
|
|
|
|
% qclone
|
2010-03-14 21:21:24 +03:00
|
|
|
|
abort: versioned patch repository not found (see init --mq)
|
2007-07-10 20:52:32 +04:00
|
|
|
|
adding .hg/patches/patch1
|
2007-02-15 13:44:08 +03:00
|
|
|
|
main repo:
|
|
|
|
|
rev 1: change foo
|
|
|
|
|
rev 0: add foo
|
|
|
|
|
patch repo:
|
|
|
|
|
rev 0: checkpoint
|
2009-10-17 01:57:34 +04:00
|
|
|
|
updating to branch default
|
2007-02-15 13:44:08 +03:00
|
|
|
|
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
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping patch1
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2007-02-15 13:44:08 +03:00
|
|
|
|
main repo:
|
|
|
|
|
rev 0: add foo
|
|
|
|
|
patch repo:
|
|
|
|
|
rev 0: checkpoint
|
2009-10-17 01:57:34 +04:00
|
|
|
|
updating to branch default
|
2007-02-15 13:44:08 +03:00
|
|
|
|
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
|
2008-03-16 02:35:12 +03:00
|
|
|
|
% test applying on an empty file (issue 1033)
|
|
|
|
|
adding a
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping changea
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2008-03-16 02:35:12 +03:00
|
|
|
|
applying changea
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: changea
|
2008-04-16 18:04:07 +04:00
|
|
|
|
% test qpush with --force, issue1087
|
|
|
|
|
adding bye.txt
|
|
|
|
|
adding hello.txt
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping empty
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2008-04-16 18:04:07 +04:00
|
|
|
|
% qpush should fail, local changes
|
|
|
|
|
abort: local changes found, refresh first
|
|
|
|
|
% apply force, should not discard changes with empty patch
|
|
|
|
|
applying empty
|
|
|
|
|
patch empty is empty
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: empty
|
2008-04-16 18:04:07 +04:00
|
|
|
|
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: empty
|
|
|
|
|
tag: qbase
|
2010-04-26 23:58:36 +04:00
|
|
|
|
tag: qtip
|
|
|
|
|
tag: tip
|
2008-04-16 18:04:07 +04:00
|
|
|
|
user: test
|
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
|
summary: imported patch empty
|
|
|
|
|
|
|
|
|
|
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping empty
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2008-04-16 18:04:07 +04:00
|
|
|
|
% qpush should fail, local changes
|
|
|
|
|
abort: local changes found, refresh first
|
|
|
|
|
% apply force, should discard changes in hello, but not bye
|
|
|
|
|
applying empty
|
2009-01-03 19:15:21 +03:00
|
|
|
|
now at: empty
|
2008-04-16 18:04:07 +04:00
|
|
|
|
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
|
2009-01-12 11:07:02 +03:00
|
|
|
|
% test popping revisions not in working dir ancestry
|
|
|
|
|
0 A empty
|
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2009-07-10 01:59:03 +04:00
|
|
|
|
popping empty
|
2009-01-03 19:15:21 +03:00
|
|
|
|
patch queue now empty
|
2009-12-11 09:09:52 +03:00
|
|
|
|
% test popping must remove files added in subdirectories first
|
|
|
|
|
popping rename-dir
|
|
|
|
|
patch queue now empty
|