##// END OF EJS Templates
strip: hide unbundle messages by default...
Matt Mackall -
r11202:f974fe89 default
parent child Browse files
Show More
@@ -1,154 +1,159 b''
1 # repair.py - functions for repository repair for mercurial
1 # repair.py - functions for repository repair for mercurial
2 #
2 #
3 # Copyright 2005, 2006 Chris Mason <mason@suse.com>
3 # Copyright 2005, 2006 Chris Mason <mason@suse.com>
4 # Copyright 2007 Matt Mackall
4 # Copyright 2007 Matt Mackall
5 #
5 #
6 # This software may be used and distributed according to the terms of the
6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2 or any later version.
7 # GNU General Public License version 2 or any later version.
8
8
9 import changegroup
9 import changegroup
10 from node import nullrev, short
10 from node import nullrev, short
11 from i18n import _
11 from i18n import _
12 import os
12 import os
13
13
14 def _bundle(repo, bases, heads, node, suffix, extranodes=None):
14 def _bundle(repo, bases, heads, node, suffix, extranodes=None):
15 """create a bundle with the specified revisions as a backup"""
15 """create a bundle with the specified revisions as a backup"""
16 cg = repo.changegroupsubset(bases, heads, 'strip', extranodes)
16 cg = repo.changegroupsubset(bases, heads, 'strip', extranodes)
17 backupdir = repo.join("strip-backup")
17 backupdir = repo.join("strip-backup")
18 if not os.path.isdir(backupdir):
18 if not os.path.isdir(backupdir):
19 os.mkdir(backupdir)
19 os.mkdir(backupdir)
20 name = os.path.join(backupdir, "%s-%s" % (short(node), suffix))
20 name = os.path.join(backupdir, "%s-%s" % (short(node), suffix))
21 return changegroup.writebundle(cg, name, "HG10BZ")
21 return changegroup.writebundle(cg, name, "HG10BZ")
22
22
23 def _collectfiles(repo, striprev):
23 def _collectfiles(repo, striprev):
24 """find out the filelogs affected by the strip"""
24 """find out the filelogs affected by the strip"""
25 files = set()
25 files = set()
26
26
27 for x in xrange(striprev, len(repo)):
27 for x in xrange(striprev, len(repo)):
28 files.update(repo[x].files())
28 files.update(repo[x].files())
29
29
30 return sorted(files)
30 return sorted(files)
31
31
32 def _collectextranodes(repo, files, link):
32 def _collectextranodes(repo, files, link):
33 """return the nodes that have to be saved before the strip"""
33 """return the nodes that have to be saved before the strip"""
34 def collectone(revlog):
34 def collectone(revlog):
35 extra = []
35 extra = []
36 startrev = count = len(revlog)
36 startrev = count = len(revlog)
37 # find the truncation point of the revlog
37 # find the truncation point of the revlog
38 for i in xrange(count):
38 for i in xrange(count):
39 lrev = revlog.linkrev(i)
39 lrev = revlog.linkrev(i)
40 if lrev >= link:
40 if lrev >= link:
41 startrev = i + 1
41 startrev = i + 1
42 break
42 break
43
43
44 # see if any revision after that point has a linkrev less than link
44 # see if any revision after that point has a linkrev less than link
45 # (we have to manually save these guys)
45 # (we have to manually save these guys)
46 for i in xrange(startrev, count):
46 for i in xrange(startrev, count):
47 node = revlog.node(i)
47 node = revlog.node(i)
48 lrev = revlog.linkrev(i)
48 lrev = revlog.linkrev(i)
49 if lrev < link:
49 if lrev < link:
50 extra.append((node, cl.node(lrev)))
50 extra.append((node, cl.node(lrev)))
51
51
52 return extra
52 return extra
53
53
54 extranodes = {}
54 extranodes = {}
55 cl = repo.changelog
55 cl = repo.changelog
56 extra = collectone(repo.manifest)
56 extra = collectone(repo.manifest)
57 if extra:
57 if extra:
58 extranodes[1] = extra
58 extranodes[1] = extra
59 for fname in files:
59 for fname in files:
60 f = repo.file(fname)
60 f = repo.file(fname)
61 extra = collectone(f)
61 extra = collectone(f)
62 if extra:
62 if extra:
63 extranodes[fname] = extra
63 extranodes[fname] = extra
64
64
65 return extranodes
65 return extranodes
66
66
67 def strip(ui, repo, node, backup="all"):
67 def strip(ui, repo, node, backup="all"):
68 cl = repo.changelog
68 cl = repo.changelog
69 # TODO delete the undo files, and handle undo of merge sets
69 # TODO delete the undo files, and handle undo of merge sets
70 striprev = cl.rev(node)
70 striprev = cl.rev(node)
71
71
72 # Some revisions with rev > striprev may not be descendants of striprev.
72 # Some revisions with rev > striprev may not be descendants of striprev.
73 # We have to find these revisions and put them in a bundle, so that
73 # We have to find these revisions and put them in a bundle, so that
74 # we can restore them after the truncations.
74 # we can restore them after the truncations.
75 # To create the bundle we use repo.changegroupsubset which requires
75 # To create the bundle we use repo.changegroupsubset which requires
76 # the list of heads and bases of the set of interesting revisions.
76 # the list of heads and bases of the set of interesting revisions.
77 # (head = revision in the set that has no descendant in the set;
77 # (head = revision in the set that has no descendant in the set;
78 # base = revision in the set that has no ancestor in the set)
78 # base = revision in the set that has no ancestor in the set)
79 tostrip = set((striprev,))
79 tostrip = set((striprev,))
80 saveheads = set()
80 saveheads = set()
81 savebases = []
81 savebases = []
82 for r in xrange(striprev + 1, len(cl)):
82 for r in xrange(striprev + 1, len(cl)):
83 parents = cl.parentrevs(r)
83 parents = cl.parentrevs(r)
84 if parents[0] in tostrip or parents[1] in tostrip:
84 if parents[0] in tostrip or parents[1] in tostrip:
85 # r is a descendant of striprev
85 # r is a descendant of striprev
86 tostrip.add(r)
86 tostrip.add(r)
87 # if this is a merge and one of the parents does not descend
87 # if this is a merge and one of the parents does not descend
88 # from striprev, mark that parent as a savehead.
88 # from striprev, mark that parent as a savehead.
89 if parents[1] != nullrev:
89 if parents[1] != nullrev:
90 for p in parents:
90 for p in parents:
91 if p not in tostrip and p > striprev:
91 if p not in tostrip and p > striprev:
92 saveheads.add(p)
92 saveheads.add(p)
93 else:
93 else:
94 # if no parents of this revision will be stripped, mark it as
94 # if no parents of this revision will be stripped, mark it as
95 # a savebase
95 # a savebase
96 if parents[0] < striprev and parents[1] < striprev:
96 if parents[0] < striprev and parents[1] < striprev:
97 savebases.append(cl.node(r))
97 savebases.append(cl.node(r))
98
98
99 saveheads.difference_update(parents)
99 saveheads.difference_update(parents)
100 saveheads.add(r)
100 saveheads.add(r)
101
101
102 saveheads = [cl.node(r) for r in saveheads]
102 saveheads = [cl.node(r) for r in saveheads]
103 files = _collectfiles(repo, striprev)
103 files = _collectfiles(repo, striprev)
104
104
105 extranodes = _collectextranodes(repo, files, striprev)
105 extranodes = _collectextranodes(repo, files, striprev)
106
106
107 # create a changegroup for all the branches we need to keep
107 # create a changegroup for all the branches we need to keep
108 backupfile = None
108 backupfile = None
109 if backup == "all":
109 if backup == "all":
110 backupfile = _bundle(repo, [node], cl.heads(), node, 'backup')
110 backupfile = _bundle(repo, [node], cl.heads(), node, 'backup')
111 repo.ui.status(_("saved backup bundle to %s\n") % backupfile)
111 repo.ui.status(_("saved backup bundle to %s\n") % backupfile)
112 if saveheads or extranodes:
112 if saveheads or extranodes:
113 chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp',
113 chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp',
114 extranodes)
114 extranodes)
115
115
116 mfst = repo.manifest
116 mfst = repo.manifest
117
117
118 tr = repo.transaction("strip")
118 tr = repo.transaction("strip")
119 offset = len(tr.entries)
119 offset = len(tr.entries)
120
120
121 try:
121 try:
122 tr.startgroup()
122 tr.startgroup()
123 cl.strip(striprev, tr)
123 cl.strip(striprev, tr)
124 mfst.strip(striprev, tr)
124 mfst.strip(striprev, tr)
125 for fn in files:
125 for fn in files:
126 repo.file(fn).strip(striprev, tr)
126 repo.file(fn).strip(striprev, tr)
127 tr.endgroup()
127 tr.endgroup()
128
128
129 try:
129 try:
130 for i in xrange(offset, len(tr.entries)):
130 for i in xrange(offset, len(tr.entries)):
131 file, troffset, ignore = tr.entries[i]
131 file, troffset, ignore = tr.entries[i]
132 repo.sopener(file, 'a').truncate(troffset)
132 repo.sopener(file, 'a').truncate(troffset)
133 tr.close()
133 tr.close()
134 except:
134 except:
135 tr.abort()
135 tr.abort()
136 raise
136 raise
137
137
138 if saveheads or extranodes:
138 if saveheads or extranodes:
139 ui.status(_("adding branch\n"))
139 ui.note(_("adding branch\n"))
140 f = open(chgrpfile, "rb")
140 f = open(chgrpfile, "rb")
141 gen = changegroup.readbundle(f, chgrpfile)
141 gen = changegroup.readbundle(f, chgrpfile)
142 if not repo.ui.verbose:
143 # silence internal shuffling chatter
144 repo.ui.pushbuffer()
142 repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile, True)
145 repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile, True)
146 if not repo.ui.verbose:
147 repo.ui.popbuffer()
143 f.close()
148 f.close()
144 if backup != "strip":
149 if backup != "strip":
145 os.unlink(chgrpfile)
150 os.unlink(chgrpfile)
146 except:
151 except:
147 if backupfile:
152 if backupfile:
148 ui.warn("strip failed, full bundle stored in '%s'\n" % backupfile)
153 ui.warn("strip failed, full bundle stored in '%s'\n" % backupfile)
149 elif saveheads:
154 elif saveheads:
150 ui.warn("strip failed, partial bundle stored in '%s'\n"
155 ui.warn("strip failed, partial bundle stored in '%s'\n"
151 % chgrpfile)
156 % chgrpfile)
152 raise
157 raise
153
158
154 repo.destroyed()
159 repo.destroyed()
@@ -1,44 +1,39 b''
1 % initialize repository
1 % initialize repository
2 adding a
2 adding a
3 adding b
3 adding b
4 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5 adding c
5 adding c
6 created new head
6 created new head
7 adding d
7 adding d
8 % bookmark list
8 % bookmark list
9 * two 3:2ae46b1d99a7
9 * two 3:2ae46b1d99a7
10 one 1:925d80f479bb
10 one 1:925d80f479bb
11 % rebase
11 % rebase
12 saved backup bundle to
12 saved backup bundle to
13 adding branch
14 adding changesets
15 adding manifests
16 adding file changes
17 added 1 changesets with 1 changes to 1 files (-1 heads)
18 rebase completed
13 rebase completed
19 changeset: 3:9163974d1cb5
14 changeset: 3:9163974d1cb5
20 tag: one
15 tag: one
21 tag: tip
16 tag: tip
22 tag: two
17 tag: two
23 parent: 1:925d80f479bb
18 parent: 1:925d80f479bb
24 parent: 2:db815d6d32e6
19 parent: 2:db815d6d32e6
25 user: test
20 user: test
26 date: Thu Jan 01 00:00:00 1970 +0000
21 date: Thu Jan 01 00:00:00 1970 +0000
27 summary: 3
22 summary: 3
28
23
29 changeset: 2:db815d6d32e6
24 changeset: 2:db815d6d32e6
30 parent: 0:f7b1eb17ad24
25 parent: 0:f7b1eb17ad24
31 user: test
26 user: test
32 date: Thu Jan 01 00:00:00 1970 +0000
27 date: Thu Jan 01 00:00:00 1970 +0000
33 summary: 2
28 summary: 2
34
29
35 changeset: 1:925d80f479bb
30 changeset: 1:925d80f479bb
36 user: test
31 user: test
37 date: Thu Jan 01 00:00:00 1970 +0000
32 date: Thu Jan 01 00:00:00 1970 +0000
38 summary: 1
33 summary: 1
39
34
40 changeset: 0:f7b1eb17ad24
35 changeset: 0:f7b1eb17ad24
41 user: test
36 user: test
42 date: Thu Jan 01 00:00:00 1970 +0000
37 date: Thu Jan 01 00:00:00 1970 +0000
43 summary: 0
38 summary: 0
44
39
@@ -1,23 +1,18 b''
1 % add file
1 % add file
2 adding qqq.txt
2 adding qqq.txt
3 % commit first revision
3 % commit first revision
4 % set bookmark
4 % set bookmark
5 % commit second revision
5 % commit second revision
6 % set bookmark
6 % set bookmark
7 % update to -2
7 % update to -2
8 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
8 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9 % commit new head
9 % commit new head
10 created new head
10 created new head
11 % bookmarks updated?
11 % bookmarks updated?
12 test 1:16b24da7e457
12 test 1:16b24da7e457
13 test2 1:16b24da7e457
13 test2 1:16b24da7e457
14 % strip to revision 1
14 % strip to revision 1
15 saved backup bundle to
15 saved backup bundle to
16 adding branch
17 adding changesets
18 adding manifests
19 adding file changes
20 added 1 changesets with 1 changes to 1 files
21 % list bookmarks
16 % list bookmarks
22 * test 1:9f1b7e78eff8
17 * test 1:9f1b7e78eff8
23 * test2 1:9f1b7e78eff8
18 * test2 1:9f1b7e78eff8
@@ -1,300 +1,295 b''
1 % init
1 % init
2 % commit
2 % commit
3 adding 1/base
3 adding 1/base
4 adding 2/base
4 adding 2/base
5 % qnew mqbase
5 % qnew mqbase
6 % qrefresh
6 % qrefresh
7 % qdiff
7 % qdiff
8 diff -r b55ecdccb5cf 1/base
8 diff -r b55ecdccb5cf 1/base
9 --- a/1/base
9 --- a/1/base
10 +++ b/1/base
10 +++ b/1/base
11 @@ -1,1 +1,1 @@
11 @@ -1,1 +1,1 @@
12 -base
12 -base
13 +patched
13 +patched
14 diff -r b55ecdccb5cf 2/base
14 diff -r b55ecdccb5cf 2/base
15 --- a/2/base
15 --- a/2/base
16 +++ b/2/base
16 +++ b/2/base
17 @@ -1,1 +1,1 @@
17 @@ -1,1 +1,1 @@
18 -base
18 -base
19 +patched
19 +patched
20 % qdiff dirname
20 % qdiff dirname
21 diff -r b55ecdccb5cf 1/base
21 diff -r b55ecdccb5cf 1/base
22 --- a/1/base
22 --- a/1/base
23 +++ b/1/base
23 +++ b/1/base
24 @@ -1,1 +1,1 @@
24 @@ -1,1 +1,1 @@
25 -base
25 -base
26 +patched
26 +patched
27 diff -r b55ecdccb5cf 2/base
27 diff -r b55ecdccb5cf 2/base
28 --- a/2/base
28 --- a/2/base
29 +++ b/2/base
29 +++ b/2/base
30 @@ -1,1 +1,1 @@
30 @@ -1,1 +1,1 @@
31 -base
31 -base
32 +patched
32 +patched
33 % patch file contents
33 % patch file contents
34 # HG changeset patch
34 # HG changeset patch
35 # Parent
35 # Parent
36 mqbase
36 mqbase
37
37
38 diff -r b55ecdccb5cf 1/base
38 diff -r b55ecdccb5cf 1/base
39 --- a/1/base
39 --- a/1/base
40 +++ b/1/base
40 +++ b/1/base
41 @@ -1,1 +1,1 @@
41 @@ -1,1 +1,1 @@
42 -base
42 -base
43 +patched
43 +patched
44 diff -r b55ecdccb5cf 2/base
44 diff -r b55ecdccb5cf 2/base
45 --- a/2/base
45 --- a/2/base
46 +++ b/2/base
46 +++ b/2/base
47 @@ -1,1 +1,1 @@
47 @@ -1,1 +1,1 @@
48 -base
48 -base
49 +patched
49 +patched
50 % qrefresh 1
50 % qrefresh 1
51 % qdiff
51 % qdiff
52 diff -r b55ecdccb5cf 1/base
52 diff -r b55ecdccb5cf 1/base
53 --- a/1/base
53 --- a/1/base
54 +++ b/1/base
54 +++ b/1/base
55 @@ -1,1 +1,1 @@
55 @@ -1,1 +1,1 @@
56 -base
56 -base
57 +patched
57 +patched
58 diff -r b55ecdccb5cf 2/base
58 diff -r b55ecdccb5cf 2/base
59 --- a/2/base
59 --- a/2/base
60 +++ b/2/base
60 +++ b/2/base
61 @@ -1,1 +1,1 @@
61 @@ -1,1 +1,1 @@
62 -base
62 -base
63 +patched
63 +patched
64 % qdiff dirname
64 % qdiff dirname
65 diff -r b55ecdccb5cf 1/base
65 diff -r b55ecdccb5cf 1/base
66 --- a/1/base
66 --- a/1/base
67 +++ b/1/base
67 +++ b/1/base
68 @@ -1,1 +1,1 @@
68 @@ -1,1 +1,1 @@
69 -base
69 -base
70 +patched
70 +patched
71 diff -r b55ecdccb5cf 2/base
71 diff -r b55ecdccb5cf 2/base
72 --- a/2/base
72 --- a/2/base
73 +++ b/2/base
73 +++ b/2/base
74 @@ -1,1 +1,1 @@
74 @@ -1,1 +1,1 @@
75 -base
75 -base
76 +patched
76 +patched
77 % patch file contents
77 % patch file contents
78 # HG changeset patch
78 # HG changeset patch
79 # Parent
79 # Parent
80 mqbase
80 mqbase
81
81
82 diff -r b55ecdccb5cf 1/base
82 diff -r b55ecdccb5cf 1/base
83 --- a/1/base
83 --- a/1/base
84 +++ b/1/base
84 +++ b/1/base
85 @@ -1,1 +1,1 @@
85 @@ -1,1 +1,1 @@
86 -base
86 -base
87 +patched
87 +patched
88 % qrefresh . in subdir
88 % qrefresh . in subdir
89 % qdiff
89 % qdiff
90 diff -r b55ecdccb5cf 1/base
90 diff -r b55ecdccb5cf 1/base
91 --- a/1/base
91 --- a/1/base
92 +++ b/1/base
92 +++ b/1/base
93 @@ -1,1 +1,1 @@
93 @@ -1,1 +1,1 @@
94 -base
94 -base
95 +patched
95 +patched
96 diff -r b55ecdccb5cf 2/base
96 diff -r b55ecdccb5cf 2/base
97 --- a/2/base
97 --- a/2/base
98 +++ b/2/base
98 +++ b/2/base
99 @@ -1,1 +1,1 @@
99 @@ -1,1 +1,1 @@
100 -base
100 -base
101 +patched
101 +patched
102 % qdiff dirname
102 % qdiff dirname
103 diff -r b55ecdccb5cf 1/base
103 diff -r b55ecdccb5cf 1/base
104 --- a/1/base
104 --- a/1/base
105 +++ b/1/base
105 +++ b/1/base
106 @@ -1,1 +1,1 @@
106 @@ -1,1 +1,1 @@
107 -base
107 -base
108 +patched
108 +patched
109 diff -r b55ecdccb5cf 2/base
109 diff -r b55ecdccb5cf 2/base
110 --- a/2/base
110 --- a/2/base
111 +++ b/2/base
111 +++ b/2/base
112 @@ -1,1 +1,1 @@
112 @@ -1,1 +1,1 @@
113 -base
113 -base
114 +patched
114 +patched
115 % patch file contents
115 % patch file contents
116 # HG changeset patch
116 # HG changeset patch
117 # Parent
117 # Parent
118 mqbase
118 mqbase
119
119
120 diff -r b55ecdccb5cf 1/base
120 diff -r b55ecdccb5cf 1/base
121 --- a/1/base
121 --- a/1/base
122 +++ b/1/base
122 +++ b/1/base
123 @@ -1,1 +1,1 @@
123 @@ -1,1 +1,1 @@
124 -base
124 -base
125 +patched
125 +patched
126 % qrefresh in hg-root again
126 % qrefresh in hg-root again
127 % qdiff
127 % qdiff
128 diff -r b55ecdccb5cf 1/base
128 diff -r b55ecdccb5cf 1/base
129 --- a/1/base
129 --- a/1/base
130 +++ b/1/base
130 +++ b/1/base
131 @@ -1,1 +1,1 @@
131 @@ -1,1 +1,1 @@
132 -base
132 -base
133 +patched
133 +patched
134 diff -r b55ecdccb5cf 2/base
134 diff -r b55ecdccb5cf 2/base
135 --- a/2/base
135 --- a/2/base
136 +++ b/2/base
136 +++ b/2/base
137 @@ -1,1 +1,1 @@
137 @@ -1,1 +1,1 @@
138 -base
138 -base
139 +patched
139 +patched
140 % qdiff dirname
140 % qdiff dirname
141 diff -r b55ecdccb5cf 1/base
141 diff -r b55ecdccb5cf 1/base
142 --- a/1/base
142 --- a/1/base
143 +++ b/1/base
143 +++ b/1/base
144 @@ -1,1 +1,1 @@
144 @@ -1,1 +1,1 @@
145 -base
145 -base
146 +patched
146 +patched
147 diff -r b55ecdccb5cf 2/base
147 diff -r b55ecdccb5cf 2/base
148 --- a/2/base
148 --- a/2/base
149 +++ b/2/base
149 +++ b/2/base
150 @@ -1,1 +1,1 @@
150 @@ -1,1 +1,1 @@
151 -base
151 -base
152 +patched
152 +patched
153 % patch file contents
153 % patch file contents
154 # HG changeset patch
154 # HG changeset patch
155 # Parent
155 # Parent
156 mqbase
156 mqbase
157
157
158 diff -r b55ecdccb5cf 1/base
158 diff -r b55ecdccb5cf 1/base
159 --- a/1/base
159 --- a/1/base
160 +++ b/1/base
160 +++ b/1/base
161 @@ -1,1 +1,1 @@
161 @@ -1,1 +1,1 @@
162 -base
162 -base
163 +patched
163 +patched
164 diff -r b55ecdccb5cf 2/base
164 diff -r b55ecdccb5cf 2/base
165 --- a/2/base
165 --- a/2/base
166 +++ b/2/base
166 +++ b/2/base
167 @@ -1,1 +1,1 @@
167 @@ -1,1 +1,1 @@
168 -base
168 -base
169 +patched
169 +patched
170
170
171 % qrefresh --short tests:
171 % qrefresh --short tests:
172 % - add 1/base and 2/base one by one
172 % - add 1/base and 2/base one by one
173 % -- qdiff output
173 % -- qdiff output
174 diff -r b55ecdccb5cf 1/base
174 diff -r b55ecdccb5cf 1/base
175 --- a/1/base
175 --- a/1/base
176 +++ b/1/base
176 +++ b/1/base
177 @@ -1,1 +1,1 @@
177 @@ -1,1 +1,1 @@
178 -base
178 -base
179 +patched
179 +patched
180 diff -r b55ecdccb5cf 2/base
180 diff -r b55ecdccb5cf 2/base
181 --- a/2/base
181 --- a/2/base
182 +++ b/2/base
182 +++ b/2/base
183 @@ -1,1 +1,1 @@
183 @@ -1,1 +1,1 @@
184 -base
184 -base
185 +patched
185 +patched
186 diff -r b55ecdccb5cf orphanchild
186 diff -r b55ecdccb5cf orphanchild
187 --- /dev/null
187 --- /dev/null
188 +++ b/orphanchild
188 +++ b/orphanchild
189 @@ -0,0 +1,1 @@
189 @@ -0,0 +1,1 @@
190 +orphan
190 +orphan
191 % -- patch file content
191 % -- patch file content
192 # HG changeset patch
192 # HG changeset patch
193 # Parent
193 # Parent
194 mqbase
194 mqbase
195
195
196 diff -r b55ecdccb5cf 1/base
196 diff -r b55ecdccb5cf 1/base
197 --- a/1/base
197 --- a/1/base
198 +++ b/1/base
198 +++ b/1/base
199 @@ -1,1 +1,1 @@
199 @@ -1,1 +1,1 @@
200 -base
200 -base
201 +patched
201 +patched
202 diff -r b55ecdccb5cf 2/base
202 diff -r b55ecdccb5cf 2/base
203 --- a/2/base
203 --- a/2/base
204 +++ b/2/base
204 +++ b/2/base
205 @@ -1,1 +1,1 @@
205 @@ -1,1 +1,1 @@
206 -base
206 -base
207 +patched
207 +patched
208 A orphanchild
208 A orphanchild
209 ? base
209 ? base
210 % -- diff shows what is not in patch
210 % -- diff shows what is not in patch
211 diff
211 diff
212 --- /dev/null
212 --- /dev/null
213 +++ b/orphanchild
213 +++ b/orphanchild
214 @@ -0,0 +1,1 @@
214 @@ -0,0 +1,1 @@
215 +orphan
215 +orphan
216 % - before starting exclusive tests
216 % - before starting exclusive tests
217 1/base
217 1/base
218 2/base
218 2/base
219 % - exclude 2/base
219 % - exclude 2/base
220 1/base
220 1/base
221 % -- status shows 2/base as dirty
221 % -- status shows 2/base as dirty
222 M 2/base
222 M 2/base
223 A orphanchild
223 A orphanchild
224 ? base
224 ? base
225 % - remove 1/base and add 2/base again but not orphanchild
225 % - remove 1/base and add 2/base again but not orphanchild
226 2/base
226 2/base
227 % - add 1/base with include filter - and thus remove 2/base from patch
227 % - add 1/base with include filter - and thus remove 2/base from patch
228 1/base
228 1/base
229
229
230 % create test repo
230 % create test repo
231 adding a
231 adding a
232 % capture changes
232 % capture changes
233 diff --git a/a b/ab
233 diff --git a/a b/ab
234 copy from a
234 copy from a
235 copy to ab
235 copy to ab
236 --- a/a
236 --- a/a
237 +++ b/ab
237 +++ b/ab
238 @@ -1,1 +1,2 @@
238 @@ -1,1 +1,2 @@
239 a
239 a
240 +b
240 +b
241 diff --git a/a b/ac
241 diff --git a/a b/ac
242 copy from a
242 copy from a
243 copy to ac
243 copy to ac
244 --- a/a
244 --- a/a
245 +++ b/ac
245 +++ b/ac
246 @@ -1,1 +1,2 @@
246 @@ -1,1 +1,2 @@
247 a
247 a
248 +c
248 +c
249 % refresh and check changes again
249 % refresh and check changes again
250 diff --git a/a b/ab
250 diff --git a/a b/ab
251 copy from a
251 copy from a
252 copy to ab
252 copy to ab
253 --- a/a
253 --- a/a
254 +++ b/ab
254 +++ b/ab
255 @@ -1,1 +1,2 @@
255 @@ -1,1 +1,2 @@
256 a
256 a
257 +b
257 +b
258 diff --git a/a b/ac
258 diff --git a/a b/ac
259 copy from a
259 copy from a
260 copy to ac
260 copy to ac
261 --- a/a
261 --- a/a
262 +++ b/ac
262 +++ b/ac
263 @@ -1,1 +1,2 @@
263 @@ -1,1 +1,2 @@
264 a
264 a
265 +c
265 +c
266 % issue1441 without git patches
266 % issue1441 without git patches
267 diff -r 000000000000 b
267 diff -r 000000000000 b
268 --- /dev/null
268 --- /dev/null
269 +++ b/b
269 +++ b/b
270 @@ -0,0 +1,1 @@
270 @@ -0,0 +1,1 @@
271 +a
271 +a
272 % issue2025: qrefresh does not honor filtering options when tip != qtip
272 % issue2025: qrefresh does not honor filtering options when tip != qtip
273 % refresh with tip != qtip
273 % refresh with tip != qtip
274 adding branch
275 adding changesets
276 adding manifests
277 adding file changes
278 added 1 changesets with 1 changes to 1 files
279 % status after refresh
274 % status after refresh
280 M a
275 M a
281 % b after refresh
276 % b after refresh
282 b
277 b
283 b
278 b
284 % patch file after refresh
279 % patch file after refresh
285 # HG changeset patch
280 # HG changeset patch
286 # Parent
281 # Parent
287
282
288 diff -r 1a60229be7ac b
283 diff -r 1a60229be7ac b
289 --- a/b
284 --- a/b
290 +++ b/b
285 +++ b/b
291 @@ -1,1 +1,2 @@
286 @@ -1,1 +1,2 @@
292 b
287 b
293 +b
288 +b
294 % issue1441 with git patches
289 % issue1441 with git patches
295 diff --git a/b b/b
290 diff --git a/b b/b
296 new file mode 100644
291 new file mode 100644
297 --- /dev/null
292 --- /dev/null
298 +++ b/b
293 +++ b/b
299 @@ -0,0 +1,1 @@
294 @@ -0,0 +1,1 @@
300 +a
295 +a
@@ -1,172 +1,167 b''
1 adding bar
1 adding bar
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 created new head
3 created new head
4 changeset: 4:443431ffac4f
4 changeset: 4:443431ffac4f
5 tag: tip
5 tag: tip
6 user: test
6 user: test
7 date: Thu Jan 01 00:00:00 1970 +0000
7 date: Thu Jan 01 00:00:00 1970 +0000
8 summary: e
8 summary: e
9
9
10 changeset: 3:65bd5f99a4a3
10 changeset: 3:65bd5f99a4a3
11 parent: 1:ef3a871183d7
11 parent: 1:ef3a871183d7
12 user: test
12 user: test
13 date: Thu Jan 01 00:00:00 1970 +0000
13 date: Thu Jan 01 00:00:00 1970 +0000
14 summary: d
14 summary: d
15
15
16 changeset: 2:264128213d29
16 changeset: 2:264128213d29
17 user: test
17 user: test
18 date: Thu Jan 01 00:00:00 1970 +0000
18 date: Thu Jan 01 00:00:00 1970 +0000
19 summary: c
19 summary: c
20
20
21 changeset: 1:ef3a871183d7
21 changeset: 1:ef3a871183d7
22 user: test
22 user: test
23 date: Thu Jan 01 00:00:00 1970 +0000
23 date: Thu Jan 01 00:00:00 1970 +0000
24 summary: b
24 summary: b
25
25
26 changeset: 0:9ab35a2d17cb
26 changeset: 0:9ab35a2d17cb
27 user: test
27 user: test
28 date: Thu Jan 01 00:00:00 1970 +0000
28 date: Thu Jan 01 00:00:00 1970 +0000
29 summary: a
29 summary: a
30
30
31 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 % before update 4, strip 4
32 % before update 4, strip 4
33 changeset: 4:443431ffac4f
33 changeset: 4:443431ffac4f
34 tag: tip
34 tag: tip
35 user: test
35 user: test
36 date: Thu Jan 01 00:00:00 1970 +0000
36 date: Thu Jan 01 00:00:00 1970 +0000
37 summary: e
37 summary: e
38
38
39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
40 saved backup bundle to
40 saved backup bundle to
41 % after update 4, strip 4
41 % after update 4, strip 4
42 changeset: 3:65bd5f99a4a3
42 changeset: 3:65bd5f99a4a3
43 tag: tip
43 tag: tip
44 parent: 1:ef3a871183d7
44 parent: 1:ef3a871183d7
45 user: test
45 user: test
46 date: Thu Jan 01 00:00:00 1970 +0000
46 date: Thu Jan 01 00:00:00 1970 +0000
47 summary: d
47 summary: d
48
48
49 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
50 % before update 4, strip 3
50 % before update 4, strip 3
51 changeset: 4:443431ffac4f
51 changeset: 4:443431ffac4f
52 tag: tip
52 tag: tip
53 user: test
53 user: test
54 date: Thu Jan 01 00:00:00 1970 +0000
54 date: Thu Jan 01 00:00:00 1970 +0000
55 summary: e
55 summary: e
56
56
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 saved backup bundle to
58 saved backup bundle to
59 % after update 4, strip 3
59 % after update 4, strip 3
60 changeset: 1:ef3a871183d7
60 changeset: 1:ef3a871183d7
61 user: test
61 user: test
62 date: Thu Jan 01 00:00:00 1970 +0000
62 date: Thu Jan 01 00:00:00 1970 +0000
63 summary: b
63 summary: b
64
64
65 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 % before update 1, strip 4
66 % before update 1, strip 4
67 changeset: 1:ef3a871183d7
67 changeset: 1:ef3a871183d7
68 user: test
68 user: test
69 date: Thu Jan 01 00:00:00 1970 +0000
69 date: Thu Jan 01 00:00:00 1970 +0000
70 summary: b
70 summary: b
71
71
72 saved backup bundle to
72 saved backup bundle to
73 % after update 1, strip 4
73 % after update 1, strip 4
74 changeset: 1:ef3a871183d7
74 changeset: 1:ef3a871183d7
75 user: test
75 user: test
76 date: Thu Jan 01 00:00:00 1970 +0000
76 date: Thu Jan 01 00:00:00 1970 +0000
77 summary: b
77 summary: b
78
78
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 % before update 4, strip 2
80 % before update 4, strip 2
81 changeset: 4:443431ffac4f
81 changeset: 4:443431ffac4f
82 tag: tip
82 tag: tip
83 user: test
83 user: test
84 date: Thu Jan 01 00:00:00 1970 +0000
84 date: Thu Jan 01 00:00:00 1970 +0000
85 summary: e
85 summary: e
86
86
87 saved backup bundle to
87 saved backup bundle to
88 adding branch
89 adding changesets
90 adding manifests
91 adding file changes
92 added 2 changesets with 2 changes to 1 files
93 % after update 4, strip 2
88 % after update 4, strip 2
94 changeset: 3:443431ffac4f
89 changeset: 3:443431ffac4f
95 tag: tip
90 tag: tip
96 user: test
91 user: test
97 date: Thu Jan 01 00:00:00 1970 +0000
92 date: Thu Jan 01 00:00:00 1970 +0000
98 summary: e
93 summary: e
99
94
100 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
101 % before update 4, strip 1
96 % before update 4, strip 1
102 changeset: 4:264128213d29
97 changeset: 4:264128213d29
103 tag: tip
98 tag: tip
104 parent: 1:ef3a871183d7
99 parent: 1:ef3a871183d7
105 user: test
100 user: test
106 date: Thu Jan 01 00:00:00 1970 +0000
101 date: Thu Jan 01 00:00:00 1970 +0000
107 summary: c
102 summary: c
108
103
109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
110 saved backup bundle to
105 saved backup bundle to
111 % after update 4, strip 1
106 % after update 4, strip 1
112 changeset: 0:9ab35a2d17cb
107 changeset: 0:9ab35a2d17cb
113 tag: tip
108 tag: tip
114 user: test
109 user: test
115 date: Thu Jan 01 00:00:00 1970 +0000
110 date: Thu Jan 01 00:00:00 1970 +0000
116 summary: a
111 summary: a
117
112
118 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
113 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
119 % before update null, strip 4
114 % before update null, strip 4
120 saved backup bundle to
115 saved backup bundle to
121 % after update null, strip 4
116 % after update null, strip 4
122 changeset: 4:264128213d29
117 changeset: 4:264128213d29
123 tag: tip
118 tag: tip
124 parent: 1:ef3a871183d7
119 parent: 1:ef3a871183d7
125 user: test
120 user: test
126 date: Thu Jan 01 00:00:00 1970 +0000
121 date: Thu Jan 01 00:00:00 1970 +0000
127 summary: c
122 summary: c
128
123
129 changeset: 3:443431ffac4f
124 changeset: 3:443431ffac4f
130 user: test
125 user: test
131 date: Thu Jan 01 00:00:00 1970 +0000
126 date: Thu Jan 01 00:00:00 1970 +0000
132 summary: e
127 summary: e
133
128
134 changeset: 2:65bd5f99a4a3
129 changeset: 2:65bd5f99a4a3
135 user: test
130 user: test
136 date: Thu Jan 01 00:00:00 1970 +0000
131 date: Thu Jan 01 00:00:00 1970 +0000
137 summary: d
132 summary: d
138
133
139 changeset: 1:ef3a871183d7
134 changeset: 1:ef3a871183d7
140 user: test
135 user: test
141 date: Thu Jan 01 00:00:00 1970 +0000
136 date: Thu Jan 01 00:00:00 1970 +0000
142 summary: b
137 summary: b
143
138
144 changeset: 0:9ab35a2d17cb
139 changeset: 0:9ab35a2d17cb
145 user: test
140 user: test
146 date: Thu Jan 01 00:00:00 1970 +0000
141 date: Thu Jan 01 00:00:00 1970 +0000
147 summary: a
142 summary: a
148
143
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
144 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
145 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 (branch merge, don't forget to commit)
146 (branch merge, don't forget to commit)
152 % before strip of merge parent
147 % before strip of merge parent
153 changeset: 2:65bd5f99a4a3
148 changeset: 2:65bd5f99a4a3
154 user: test
149 user: test
155 date: Thu Jan 01 00:00:00 1970 +0000
150 date: Thu Jan 01 00:00:00 1970 +0000
156 summary: d
151 summary: d
157
152
158 changeset: 4:264128213d29
153 changeset: 4:264128213d29
159 tag: tip
154 tag: tip
160 parent: 1:ef3a871183d7
155 parent: 1:ef3a871183d7
161 user: test
156 user: test
162 date: Thu Jan 01 00:00:00 1970 +0000
157 date: Thu Jan 01 00:00:00 1970 +0000
163 summary: c
158 summary: c
164
159
165 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
166 saved backup bundle to
161 saved backup bundle to
167 % after strip of merge parent
162 % after strip of merge parent
168 changeset: 1:ef3a871183d7
163 changeset: 1:ef3a871183d7
169 user: test
164 user: test
170 date: Thu Jan 01 00:00:00 1970 +0000
165 date: Thu Jan 01 00:00:00 1970 +0000
171 summary: b
166 summary: b
172
167
@@ -1,650 +1,635 b''
1 % help
1 % help
2 mq extension - manage a stack of patches
2 mq extension - manage a stack of patches
3
3
4 This extension lets you work with a stack of patches in a Mercurial
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 applied
5 repository. It manages two stacks of patches - all known patches, and applied
6 patches (subset of known patches).
6 patches (subset of known patches).
7
7
8 Known patches are represented as patch files in the .hg/patches directory.
8 Known patches are represented as patch files in the .hg/patches directory.
9 Applied patches are both patch files and changesets.
9 Applied patches are both patch files and changesets.
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 create new patch qnew
13 create new patch qnew
14 import existing patch qimport
14 import existing patch qimport
15
15
16 print patch series qseries
16 print patch series qseries
17 print applied patches qapplied
17 print applied patches qapplied
18
18
19 add known patch to applied stack qpush
19 add known patch to applied stack qpush
20 remove patch from applied stack qpop
20 remove patch from applied stack qpop
21 refresh contents of top applied patch qrefresh
21 refresh contents of top applied patch qrefresh
22
22
23 By default, mq will automatically use git patches when required to avoid
23 By default, mq will automatically use git patches when required to avoid
24 losing file mode changes, copy records, binary files or empty files creations
24 losing file mode changes, copy records, binary files or empty files creations
25 or deletions. This behaviour can be configured with:
25 or deletions. This behaviour can be configured with:
26
26
27 [mq]
27 [mq]
28 git = auto/keep/yes/no
28 git = auto/keep/yes/no
29
29
30 If set to 'keep', mq will obey the [diff] section configuration while
30 If set to 'keep', mq will obey the [diff] section configuration while
31 preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
31 preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
32 will override the [diff] section and always generate git or regular patches,
32 will override the [diff] section and always generate git or regular patches,
33 possibly losing data in the second case.
33 possibly losing data in the second case.
34
34
35 list of commands:
35 list of commands:
36
36
37 qapplied print the patches already applied
37 qapplied print the patches already applied
38 qclone clone main and patch repository at same time
38 qclone clone main and patch repository at same time
39 qdelete remove patches from queue
39 qdelete remove patches from queue
40 qdiff diff of the current patch and subsequent modifications
40 qdiff diff of the current patch and subsequent modifications
41 qfinish move applied patches into repository history
41 qfinish move applied patches into repository history
42 qfold fold the named patches into the current patch
42 qfold fold the named patches into the current patch
43 qgoto push or pop patches until named patch is at top of stack
43 qgoto push or pop patches until named patch is at top of stack
44 qguard set or print guards for a patch
44 qguard set or print guards for a patch
45 qheader print the header of the topmost or specified patch
45 qheader print the header of the topmost or specified patch
46 qimport import a patch
46 qimport import a patch
47 qnew create a new patch
47 qnew create a new patch
48 qnext print the name of the next patch
48 qnext print the name of the next patch
49 qpop pop the current patch off the stack
49 qpop pop the current patch off the stack
50 qprev print the name of the previous patch
50 qprev print the name of the previous patch
51 qpush push the next patch onto the stack
51 qpush push the next patch onto the stack
52 qrefresh update the current patch
52 qrefresh update the current patch
53 qrename rename a patch
53 qrename rename a patch
54 qselect set or print guarded patches to push
54 qselect set or print guarded patches to push
55 qseries print the entire series file
55 qseries print the entire series file
56 qtop print the name of the current patch
56 qtop print the name of the current patch
57 qunapplied print the patches not yet applied
57 qunapplied print the patches not yet applied
58 strip strip a changeset and all its descendants from the repository
58 strip strip a changeset and all its descendants from the repository
59
59
60 use "hg -v help mq" to show aliases and global options
60 use "hg -v help mq" to show aliases and global options
61 adding a
61 adding a
62 updating to branch default
62 updating to branch default
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
64 adding b/z
64 adding b/z
65 % qinit
65 % qinit
66 % -R qinit
66 % -R qinit
67 % qinit -c
67 % qinit -c
68 A .hgignore
68 A .hgignore
69 A series
69 A series
70 % qinit; qinit -c
70 % qinit; qinit -c
71 .hgignore:
71 .hgignore:
72 ^\.hg
72 ^\.hg
73 ^\.mq
73 ^\.mq
74 syntax: glob
74 syntax: glob
75 status
75 status
76 guards
76 guards
77 series:
77 series:
78 abort: repository already exists!
78 abort: repository already exists!
79 % qinit; <stuff>; qinit -c
79 % qinit; <stuff>; qinit -c
80 adding .hg/patches/A
80 adding .hg/patches/A
81 adding .hg/patches/B
81 adding .hg/patches/B
82 A .hgignore
82 A .hgignore
83 A A
83 A A
84 A B
84 A B
85 A series
85 A series
86 .hgignore:
86 .hgignore:
87 status
87 status
88 bleh
88 bleh
89 series:
89 series:
90 A
90 A
91 B
91 B
92 % init --mq without repo
92 % init --mq without repo
93 abort: There is no Mercurial repository here (.hg not found)
93 abort: There is no Mercurial repository here (.hg not found)
94 % init --mq with repo path
94 % init --mq with repo path
95 ok
95 ok
96 % init --mq with nonexistent directory
96 % init --mq with nonexistent directory
97 abort: repository nonexistentdir not found!
97 abort: repository nonexistentdir not found!
98 % init --mq with bundle (non "local")
98 % init --mq with bundle (non "local")
99 abort: only a local queue repository may be initialized
99 abort: only a local queue repository may be initialized
100 % qrefresh
100 % qrefresh
101 foo bar
101 foo bar
102
102
103 diff -r xa
103 diff -r xa
104 --- a/a
104 --- a/a
105 +++ b/a
105 +++ b/a
106 @@ -1,1 +1,2 @@
106 @@ -1,1 +1,2 @@
107 a
107 a
108 +a
108 +a
109 % empty qrefresh
109 % empty qrefresh
110 revision:
110 revision:
111 patch:
111 patch:
112 foo bar
112 foo bar
113
113
114 working dir diff:
114 working dir diff:
115 --- a/a
115 --- a/a
116 +++ b/a
116 +++ b/a
117 @@ -1,1 +1,2 @@
117 @@ -1,1 +1,2 @@
118 a
118 a
119 +a
119 +a
120 % qpop
120 % qpop
121 popping test.patch
121 popping test.patch
122 patch queue now empty
122 patch queue now empty
123 % qpush with dump of tag cache
123 % qpush with dump of tag cache
124 .hg/tags.cache (pre qpush):
124 .hg/tags.cache (pre qpush):
125 1
125 1
126
126
127 applying test.patch
127 applying test.patch
128 now at: test.patch
128 now at: test.patch
129 .hg/tags.cache (post qpush):
129 .hg/tags.cache (post qpush):
130 2
130 2
131
131
132 % pop/push outside repo
132 % pop/push outside repo
133 popping test.patch
133 popping test.patch
134 patch queue now empty
134 patch queue now empty
135 applying test.patch
135 applying test.patch
136 now at: test.patch
136 now at: test.patch
137 % qrefresh in subdir
137 % qrefresh in subdir
138 % pop/push -a in subdir
138 % pop/push -a in subdir
139 popping test2.patch
139 popping test2.patch
140 popping test.patch
140 popping test.patch
141 patch queue now empty
141 patch queue now empty
142 applying test.patch
142 applying test.patch
143 applying test2.patch
143 applying test2.patch
144 now at: test2.patch
144 now at: test2.patch
145 % qseries
145 % qseries
146 test.patch
146 test.patch
147 test2.patch
147 test2.patch
148 0 A test.patch: f...
148 0 A test.patch: f...
149 1 A test2.patch:
149 1 A test2.patch:
150 popping test2.patch
150 popping test2.patch
151 now at: test.patch
151 now at: test.patch
152 0 A test.patch: foo bar
152 0 A test.patch: foo bar
153 1 U test2.patch:
153 1 U test2.patch:
154 mq: 1 applied, 1 unapplied
154 mq: 1 applied, 1 unapplied
155 applying test2.patch
155 applying test2.patch
156 now at: test2.patch
156 now at: test2.patch
157 mq: 2 applied
157 mq: 2 applied
158 % qapplied
158 % qapplied
159 test.patch
159 test.patch
160 test2.patch
160 test2.patch
161 % qtop
161 % qtop
162 test2.patch
162 test2.patch
163 % prev
163 % prev
164 test.patch
164 test.patch
165 % next
165 % next
166 all patches applied
166 all patches applied
167 popping test2.patch
167 popping test2.patch
168 now at: test.patch
168 now at: test.patch
169 % commit should fail
169 % commit should fail
170 abort: cannot commit over an applied mq patch
170 abort: cannot commit over an applied mq patch
171 % push should fail
171 % push should fail
172 pushing to ../../k
172 pushing to ../../k
173 abort: source has mq patches applied
173 abort: source has mq patches applied
174 % import should fail
174 % import should fail
175 abort: cannot import over an applied patch
175 abort: cannot import over an applied patch
176 % import --no-commit should succeed
176 % import --no-commit should succeed
177 applying ../../import.diff
177 applying ../../import.diff
178 M a
178 M a
179 % qunapplied
179 % qunapplied
180 test2.patch
180 test2.patch
181 % qpush/qpop with index
181 % qpush/qpop with index
182 applying test2.patch
182 applying test2.patch
183 now at: test2.patch
183 now at: test2.patch
184 popping test2.patch
184 popping test2.patch
185 popping test1b.patch
185 popping test1b.patch
186 now at: test.patch
186 now at: test.patch
187 applying test1b.patch
187 applying test1b.patch
188 now at: test1b.patch
188 now at: test1b.patch
189 applying test2.patch
189 applying test2.patch
190 now at: test2.patch
190 now at: test2.patch
191 popping test2.patch
191 popping test2.patch
192 now at: test1b.patch
192 now at: test1b.patch
193 popping test1b.patch
193 popping test1b.patch
194 now at: test.patch
194 now at: test.patch
195 applying test1b.patch
195 applying test1b.patch
196 applying test2.patch
196 applying test2.patch
197 now at: test2.patch
197 now at: test2.patch
198 % qpush --move
198 % qpush --move
199 popping test2.patch
199 popping test2.patch
200 popping test1b.patch
200 popping test1b.patch
201 popping test.patch
201 popping test.patch
202 patch queue now empty
202 patch queue now empty
203 applying test2.patch
203 applying test2.patch
204 now at: test2.patch
204 now at: test2.patch
205 applying test1b.patch
205 applying test1b.patch
206 now at: test1b.patch
206 now at: test1b.patch
207 applying test.patch
207 applying test.patch
208 now at: test.patch
208 now at: test.patch
209 0 A test2.patch
209 0 A test2.patch
210 1 A test1b.patch
210 1 A test1b.patch
211 2 A test.patch
211 2 A test.patch
212 popping test.patch
212 popping test.patch
213 popping test1b.patch
213 popping test1b.patch
214 popping test2.patch
214 popping test2.patch
215 patch queue now empty
215 patch queue now empty
216 applying test.patch
216 applying test.patch
217 now at: test.patch
217 now at: test.patch
218 applying test1b.patch
218 applying test1b.patch
219 now at: test1b.patch
219 now at: test1b.patch
220 abort: patch bogus not in series
220 abort: patch bogus not in series
221 abort: cannot push to a previous patch: test.patch
221 abort: cannot push to a previous patch: test.patch
222 applying test2.patch
222 applying test2.patch
223 now at: test2.patch
223 now at: test2.patch
224 % pop, qapplied, qunapplied
224 % pop, qapplied, qunapplied
225 0 A test.patch
225 0 A test.patch
226 1 A test1b.patch
226 1 A test1b.patch
227 2 A test2.patch
227 2 A test2.patch
228 % qapplied -1 test.patch
228 % qapplied -1 test.patch
229 only one patch applied
229 only one patch applied
230 % qapplied -1 test1b.patch
230 % qapplied -1 test1b.patch
231 test.patch
231 test.patch
232 % qapplied -1 test2.patch
232 % qapplied -1 test2.patch
233 test1b.patch
233 test1b.patch
234 % qapplied -1
234 % qapplied -1
235 test1b.patch
235 test1b.patch
236 % qapplied
236 % qapplied
237 test.patch
237 test.patch
238 test1b.patch
238 test1b.patch
239 test2.patch
239 test2.patch
240 % qapplied test1b.patch
240 % qapplied test1b.patch
241 test.patch
241 test.patch
242 test1b.patch
242 test1b.patch
243 % qunapplied -1
243 % qunapplied -1
244 all patches applied
244 all patches applied
245 % qunapplied
245 % qunapplied
246 % popping
246 % popping
247 popping test2.patch
247 popping test2.patch
248 now at: test1b.patch
248 now at: test1b.patch
249 % qunapplied -1
249 % qunapplied -1
250 test2.patch
250 test2.patch
251 % qunapplied
251 % qunapplied
252 test2.patch
252 test2.patch
253 % qunapplied test2.patch
253 % qunapplied test2.patch
254 % qunapplied -1 test2.patch
254 % qunapplied -1 test2.patch
255 all patches applied
255 all patches applied
256 % popping -a
256 % popping -a
257 popping test1b.patch
257 popping test1b.patch
258 popping test.patch
258 popping test.patch
259 patch queue now empty
259 patch queue now empty
260 % qapplied
260 % qapplied
261 % qapplied -1
261 % qapplied -1
262 no patches applied
262 no patches applied
263 applying test.patch
263 applying test.patch
264 now at: test.patch
264 now at: test.patch
265 % push should succeed
265 % push should succeed
266 popping test.patch
266 popping test.patch
267 patch queue now empty
267 patch queue now empty
268 pushing to ../../k
268 pushing to ../../k
269 searching for changes
269 searching for changes
270 adding changesets
270 adding changesets
271 adding manifests
271 adding manifests
272 adding file changes
272 adding file changes
273 added 1 changesets with 1 changes to 1 files
273 added 1 changesets with 1 changes to 1 files
274 % qpush/qpop error codes
274 % qpush/qpop error codes
275 applying test.patch
275 applying test.patch
276 applying test1b.patch
276 applying test1b.patch
277 applying test2.patch
277 applying test2.patch
278 now at: test2.patch
278 now at: test2.patch
279 % pops all patches and succeeds
279 % pops all patches and succeeds
280 popping test2.patch
280 popping test2.patch
281 popping test1b.patch
281 popping test1b.patch
282 popping test.patch
282 popping test.patch
283 patch queue now empty
283 patch queue now empty
284 qpop -a succeeds
284 qpop -a succeeds
285 % does nothing and succeeds
285 % does nothing and succeeds
286 no patches applied
286 no patches applied
287 qpop -a succeeds
287 qpop -a succeeds
288 % fails - nothing else to pop
288 % fails - nothing else to pop
289 no patches applied
289 no patches applied
290 qpop fails
290 qpop fails
291 % pushes a patch and succeeds
291 % pushes a patch and succeeds
292 applying test.patch
292 applying test.patch
293 now at: test.patch
293 now at: test.patch
294 qpush succeeds
294 qpush succeeds
295 % pops a patch and succeeds
295 % pops a patch and succeeds
296 popping test.patch
296 popping test.patch
297 patch queue now empty
297 patch queue now empty
298 qpop succeeds
298 qpop succeeds
299 % pushes up to test1b.patch and succeeds
299 % pushes up to test1b.patch and succeeds
300 applying test.patch
300 applying test.patch
301 applying test1b.patch
301 applying test1b.patch
302 now at: test1b.patch
302 now at: test1b.patch
303 qpush test1b.patch succeeds
303 qpush test1b.patch succeeds
304 % does nothing and succeeds
304 % does nothing and succeeds
305 qpush: test1b.patch is already at the top
305 qpush: test1b.patch is already at the top
306 qpush test1b.patch succeeds
306 qpush test1b.patch succeeds
307 % does nothing and succeeds
307 % does nothing and succeeds
308 qpop: test1b.patch is already at the top
308 qpop: test1b.patch is already at the top
309 qpop test1b.patch succeeds
309 qpop test1b.patch succeeds
310 % fails - can't push to this patch
310 % fails - can't push to this patch
311 abort: cannot push to a previous patch: test.patch
311 abort: cannot push to a previous patch: test.patch
312 qpush test.patch fails
312 qpush test.patch fails
313 % fails - can't pop to this patch
313 % fails - can't pop to this patch
314 abort: patch test2.patch is not applied
314 abort: patch test2.patch is not applied
315 qpop test2.patch fails
315 qpop test2.patch fails
316 % pops up to test.patch and succeeds
316 % pops up to test.patch and succeeds
317 popping test1b.patch
317 popping test1b.patch
318 now at: test.patch
318 now at: test.patch
319 qpop test.patch succeeds
319 qpop test.patch succeeds
320 % pushes all patches and succeeds
320 % pushes all patches and succeeds
321 applying test1b.patch
321 applying test1b.patch
322 applying test2.patch
322 applying test2.patch
323 now at: test2.patch
323 now at: test2.patch
324 qpush -a succeeds
324 qpush -a succeeds
325 % does nothing and succeeds
325 % does nothing and succeeds
326 all patches are currently applied
326 all patches are currently applied
327 qpush -a succeeds
327 qpush -a succeeds
328 % fails - nothing else to push
328 % fails - nothing else to push
329 patch series already fully applied
329 patch series already fully applied
330 qpush fails
330 qpush fails
331 % does nothing and succeeds
331 % does nothing and succeeds
332 qpush: test2.patch is already at the top
332 qpush: test2.patch is already at the top
333 qpush test2.patch succeeds
333 qpush test2.patch succeeds
334 % strip
334 % strip
335 adding x
335 adding x
336 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
336 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
337 saved backup bundle to
337 saved backup bundle to
338 adding changesets
338 adding changesets
339 adding manifests
339 adding manifests
340 adding file changes
340 adding file changes
341 added 1 changesets with 1 changes to 1 files
341 added 1 changesets with 1 changes to 1 files
342 (run 'hg update' to get a working copy)
342 (run 'hg update' to get a working copy)
343 % strip with local changes, should complain
343 % strip with local changes, should complain
344 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
344 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
345 abort: local changes found
345 abort: local changes found
346 % --force strip with local changes
346 % --force strip with local changes
347 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
347 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
348 saved backup bundle to
348 saved backup bundle to
349 % cd b; hg qrefresh
349 % cd b; hg qrefresh
350 adding a
350 adding a
351 foo
351 foo
352
352
353 diff -r cb9a9f314b8b a
353 diff -r cb9a9f314b8b a
354 --- a/a
354 --- a/a
355 +++ b/a
355 +++ b/a
356 @@ -1,1 +1,2 @@
356 @@ -1,1 +1,2 @@
357 a
357 a
358 +a
358 +a
359 diff -r cb9a9f314b8b b/f
359 diff -r cb9a9f314b8b b/f
360 --- /dev/null
360 --- /dev/null
361 +++ b/b/f
361 +++ b/b/f
362 @@ -0,0 +1,1 @@
362 @@ -0,0 +1,1 @@
363 +f
363 +f
364 % hg qrefresh .
364 % hg qrefresh .
365 foo
365 foo
366
366
367 diff -r cb9a9f314b8b b/f
367 diff -r cb9a9f314b8b b/f
368 --- /dev/null
368 --- /dev/null
369 +++ b/b/f
369 +++ b/b/f
370 @@ -0,0 +1,1 @@
370 @@ -0,0 +1,1 @@
371 +f
371 +f
372 M a
372 M a
373 % qpush failure
373 % qpush failure
374 popping bar
374 popping bar
375 popping foo
375 popping foo
376 patch queue now empty
376 patch queue now empty
377 applying foo
377 applying foo
378 applying bar
378 applying bar
379 file foo already exists
379 file foo already exists
380 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
380 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
381 patch failed, unable to continue (try -v)
381 patch failed, unable to continue (try -v)
382 patch failed, rejects left in working dir
382 patch failed, rejects left in working dir
383 errors during apply, please fix and refresh bar
383 errors during apply, please fix and refresh bar
384 ? foo
384 ? foo
385 ? foo.rej
385 ? foo.rej
386 % mq tags
386 % mq tags
387 0 qparent
387 0 qparent
388 1 foo qbase
388 1 foo qbase
389 2 bar qtip tip
389 2 bar qtip tip
390 % bad node in status
390 % bad node in status
391 popping bar
391 popping bar
392 now at: foo
392 now at: foo
393 changeset: 0:cb9a9f314b8b
393 changeset: 0:cb9a9f314b8b
394 mq status file refers to unknown node
394 mq status file refers to unknown node
395 tag: tip
395 tag: tip
396 user: test
396 user: test
397 date: Thu Jan 01 00:00:00 1970 +0000
397 date: Thu Jan 01 00:00:00 1970 +0000
398 summary: a
398 summary: a
399
399
400 mq status file refers to unknown node
400 mq status file refers to unknown node
401 default 0:cb9a9f314b8b
401 default 0:cb9a9f314b8b
402 abort: trying to pop unknown node
402 abort: trying to pop unknown node
403 new file
403 new file
404
404
405 diff --git a/new b/new
405 diff --git a/new b/new
406 new file mode 100755
406 new file mode 100755
407 --- /dev/null
407 --- /dev/null
408 +++ b/new
408 +++ b/new
409 @@ -0,0 +1,1 @@
409 @@ -0,0 +1,1 @@
410 +foo
410 +foo
411 copy file
411 copy file
412
412
413 diff --git a/new b/copy
413 diff --git a/new b/copy
414 copy from new
414 copy from new
415 copy to copy
415 copy to copy
416 popping copy
416 popping copy
417 now at: new
417 now at: new
418 applying copy
418 applying copy
419 now at: copy
419 now at: copy
420 diff --git a/new b/copy
420 diff --git a/new b/copy
421 copy from new
421 copy from new
422 copy to copy
422 copy to copy
423 diff --git a/new b/copy
423 diff --git a/new b/copy
424 copy from new
424 copy from new
425 copy to copy
425 copy to copy
426 % test file addition in slow path
426 % test file addition in slow path
427 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
427 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
428 created new head
428 created new head
429 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
429 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
430 adding branch
431 adding changesets
432 adding manifests
433 adding file changes
434 added 1 changesets with 1 changes to 1 files
435 diff --git a/bar b/bar
430 diff --git a/bar b/bar
436 new file mode 100644
431 new file mode 100644
437 --- /dev/null
432 --- /dev/null
438 +++ b/bar
433 +++ b/bar
439 @@ -0,0 +1,1 @@
434 @@ -0,0 +1,1 @@
440 +bar
435 +bar
441 diff --git a/foo b/baz
436 diff --git a/foo b/baz
442 rename from foo
437 rename from foo
443 rename to baz
438 rename to baz
444 2 baz (foo)
439 2 baz (foo)
445 diff --git a/bar b/bar
440 diff --git a/bar b/bar
446 new file mode 100644
441 new file mode 100644
447 --- /dev/null
442 --- /dev/null
448 +++ b/bar
443 +++ b/bar
449 @@ -0,0 +1,1 @@
444 @@ -0,0 +1,1 @@
450 +bar
445 +bar
451 diff --git a/foo b/baz
446 diff --git a/foo b/baz
452 rename from foo
447 rename from foo
453 rename to baz
448 rename to baz
454 2 baz (foo)
449 2 baz (foo)
455 diff --git a/bar b/bar
450 diff --git a/bar b/bar
456 diff --git a/foo b/baz
451 diff --git a/foo b/baz
457 % test file move chains in the slow path
452 % test file move chains in the slow path
458 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
453 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
459 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
454 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
460 adding branch
461 adding changesets
462 adding manifests
463 adding file changes
464 added 1 changesets with 1 changes to 1 files
465 diff --git a/foo b/bleh
455 diff --git a/foo b/bleh
466 rename from foo
456 rename from foo
467 rename to bleh
457 rename to bleh
468 diff --git a/quux b/quux
458 diff --git a/quux b/quux
469 new file mode 100644
459 new file mode 100644
470 --- /dev/null
460 --- /dev/null
471 +++ b/quux
461 +++ b/quux
472 @@ -0,0 +1,1 @@
462 @@ -0,0 +1,1 @@
473 +bar
463 +bar
474 3 bleh (foo)
464 3 bleh (foo)
475 diff --git a/foo b/barney
465 diff --git a/foo b/barney
476 rename from foo
466 rename from foo
477 rename to barney
467 rename to barney
478 diff --git a/fred b/fred
468 diff --git a/fred b/fred
479 new file mode 100644
469 new file mode 100644
480 --- /dev/null
470 --- /dev/null
481 +++ b/fred
471 +++ b/fred
482 @@ -0,0 +1,1 @@
472 @@ -0,0 +1,1 @@
483 +bar
473 +bar
484 3 barney (foo)
474 3 barney (foo)
485 % refresh omitting an added file
475 % refresh omitting an added file
486 C newfile
476 C newfile
487 A newfile
477 A newfile
488 popping baz
478 popping baz
489 now at: bar
479 now at: bar
490 % create a git patch
480 % create a git patch
491 diff --git a/alexander b/alexander
481 diff --git a/alexander b/alexander
492 % create a git binary patch
482 % create a git binary patch
493 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
483 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
494 diff --git a/bucephalus b/bucephalus
484 diff --git a/bucephalus b/bucephalus
495 % check binary patches can be popped and pushed
485 % check binary patches can be popped and pushed
496 popping addbucephalus
486 popping addbucephalus
497 now at: addalexander
487 now at: addalexander
498 applying addbucephalus
488 applying addbucephalus
499 now at: addbucephalus
489 now at: addbucephalus
500 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
490 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
501 % strip again
491 % strip again
502 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
492 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
503 created new head
493 created new head
504 merging foo
494 merging foo
505 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
495 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
506 (branch merge, don't forget to commit)
496 (branch merge, don't forget to commit)
507 changeset: 3:99615015637b
497 changeset: 3:99615015637b
508 tag: tip
498 tag: tip
509 parent: 2:20cbbe65cff7
499 parent: 2:20cbbe65cff7
510 parent: 1:d2871fc282d4
500 parent: 1:d2871fc282d4
511 user: test
501 user: test
512 date: Thu Jan 01 00:00:00 1970 +0000
502 date: Thu Jan 01 00:00:00 1970 +0000
513 summary: merge
503 summary: merge
514
504
515 changeset: 2:20cbbe65cff7
505 changeset: 2:20cbbe65cff7
516 parent: 0:53245c60e682
506 parent: 0:53245c60e682
517 user: test
507 user: test
518 date: Thu Jan 01 00:00:00 1970 +0000
508 date: Thu Jan 01 00:00:00 1970 +0000
519 summary: change foo 2
509 summary: change foo 2
520
510
521 changeset: 1:d2871fc282d4
511 changeset: 1:d2871fc282d4
522 user: test
512 user: test
523 date: Thu Jan 01 00:00:00 1970 +0000
513 date: Thu Jan 01 00:00:00 1970 +0000
524 summary: change foo 1
514 summary: change foo 1
525
515
526 changeset: 0:53245c60e682
516 changeset: 0:53245c60e682
527 user: test
517 user: test
528 date: Thu Jan 01 00:00:00 1970 +0000
518 date: Thu Jan 01 00:00:00 1970 +0000
529 summary: add foo
519 summary: add foo
530
520
531 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
521 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
532 saved backup bundle to
522 saved backup bundle to
533 adding branch
534 adding changesets
535 adding manifests
536 adding file changes
537 added 1 changesets with 1 changes to 1 files
538 changeset: 1:20cbbe65cff7
523 changeset: 1:20cbbe65cff7
539 tag: tip
524 tag: tip
540 user: test
525 user: test
541 date: Thu Jan 01 00:00:00 1970 +0000
526 date: Thu Jan 01 00:00:00 1970 +0000
542 summary: change foo 2
527 summary: change foo 2
543
528
544 changeset: 0:53245c60e682
529 changeset: 0:53245c60e682
545 user: test
530 user: test
546 date: Thu Jan 01 00:00:00 1970 +0000
531 date: Thu Jan 01 00:00:00 1970 +0000
547 summary: add foo
532 summary: add foo
548
533
549 % qclone
534 % qclone
550 abort: versioned patch repository not found (see init --mq)
535 abort: versioned patch repository not found (see init --mq)
551 adding .hg/patches/patch1
536 adding .hg/patches/patch1
552 main repo:
537 main repo:
553 rev 1: change foo
538 rev 1: change foo
554 rev 0: add foo
539 rev 0: add foo
555 patch repo:
540 patch repo:
556 rev 0: checkpoint
541 rev 0: checkpoint
557 updating to branch default
542 updating to branch default
558 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
543 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
559 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
544 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
560 main repo:
545 main repo:
561 rev 0: add foo
546 rev 0: add foo
562 patch repo:
547 patch repo:
563 rev 0: checkpoint
548 rev 0: checkpoint
564 popping patch1
549 popping patch1
565 patch queue now empty
550 patch queue now empty
566 main repo:
551 main repo:
567 rev 0: add foo
552 rev 0: add foo
568 patch repo:
553 patch repo:
569 rev 0: checkpoint
554 rev 0: checkpoint
570 updating to branch default
555 updating to branch default
571 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
556 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
572 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
557 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
573 main repo:
558 main repo:
574 rev 0: add foo
559 rev 0: add foo
575 patch repo:
560 patch repo:
576 rev 0: checkpoint
561 rev 0: checkpoint
577 % test applying on an empty file (issue 1033)
562 % test applying on an empty file (issue 1033)
578 adding a
563 adding a
579 popping changea
564 popping changea
580 patch queue now empty
565 patch queue now empty
581 applying changea
566 applying changea
582 now at: changea
567 now at: changea
583 % test qpush with --force, issue1087
568 % test qpush with --force, issue1087
584 adding bye.txt
569 adding bye.txt
585 adding hello.txt
570 adding hello.txt
586 popping empty
571 popping empty
587 patch queue now empty
572 patch queue now empty
588 % qpush should fail, local changes
573 % qpush should fail, local changes
589 abort: local changes found, refresh first
574 abort: local changes found, refresh first
590 % apply force, should not discard changes with empty patch
575 % apply force, should not discard changes with empty patch
591 applying empty
576 applying empty
592 patch empty is empty
577 patch empty is empty
593 now at: empty
578 now at: empty
594 diff -r bf5fc3f07a0a hello.txt
579 diff -r bf5fc3f07a0a hello.txt
595 --- a/hello.txt
580 --- a/hello.txt
596 +++ b/hello.txt
581 +++ b/hello.txt
597 @@ -1,1 +1,2 @@
582 @@ -1,1 +1,2 @@
598 hello
583 hello
599 +world
584 +world
600 diff -r 9ecee4f634e3 hello.txt
585 diff -r 9ecee4f634e3 hello.txt
601 --- a/hello.txt
586 --- a/hello.txt
602 +++ b/hello.txt
587 +++ b/hello.txt
603 @@ -1,1 +1,2 @@
588 @@ -1,1 +1,2 @@
604 hello
589 hello
605 +world
590 +world
606 changeset: 1:bf5fc3f07a0a
591 changeset: 1:bf5fc3f07a0a
607 tag: empty
592 tag: empty
608 tag: qbase
593 tag: qbase
609 tag: qtip
594 tag: qtip
610 tag: tip
595 tag: tip
611 user: test
596 user: test
612 date: Thu Jan 01 00:00:00 1970 +0000
597 date: Thu Jan 01 00:00:00 1970 +0000
613 summary: imported patch empty
598 summary: imported patch empty
614
599
615
600
616 popping empty
601 popping empty
617 patch queue now empty
602 patch queue now empty
618 % qpush should fail, local changes
603 % qpush should fail, local changes
619 abort: local changes found, refresh first
604 abort: local changes found, refresh first
620 % apply force, should discard changes in hello, but not bye
605 % apply force, should discard changes in hello, but not bye
621 applying empty
606 applying empty
622 now at: empty
607 now at: empty
623 M bye.txt
608 M bye.txt
624 diff -r ba252371dbc1 bye.txt
609 diff -r ba252371dbc1 bye.txt
625 --- a/bye.txt
610 --- a/bye.txt
626 +++ b/bye.txt
611 +++ b/bye.txt
627 @@ -1,1 +1,2 @@
612 @@ -1,1 +1,2 @@
628 bye
613 bye
629 +universe
614 +universe
630 diff -r 9ecee4f634e3 bye.txt
615 diff -r 9ecee4f634e3 bye.txt
631 --- a/bye.txt
616 --- a/bye.txt
632 +++ b/bye.txt
617 +++ b/bye.txt
633 @@ -1,1 +1,2 @@
618 @@ -1,1 +1,2 @@
634 bye
619 bye
635 +universe
620 +universe
636 diff -r 9ecee4f634e3 hello.txt
621 diff -r 9ecee4f634e3 hello.txt
637 --- a/hello.txt
622 --- a/hello.txt
638 +++ b/hello.txt
623 +++ b/hello.txt
639 @@ -1,1 +1,3 @@
624 @@ -1,1 +1,3 @@
640 hello
625 hello
641 +world
626 +world
642 +universe
627 +universe
643 % test popping revisions not in working dir ancestry
628 % test popping revisions not in working dir ancestry
644 0 A empty
629 0 A empty
645 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
630 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
646 popping empty
631 popping empty
647 patch queue now empty
632 patch queue now empty
648 % test popping must remove files added in subdirectories first
633 % test popping must remove files added in subdirectories first
649 popping rename-dir
634 popping rename-dir
650 patch queue now empty
635 patch queue now empty
@@ -1,186 +1,171 b''
1
1
2 @ 8:c11d5b3e9c00 F branch: branch3
2 @ 8:c11d5b3e9c00 F branch: branch3
3 |
3 |
4 o 7:33c9da881988 Branch3 branch: branch3
4 o 7:33c9da881988 Branch3 branch: branch3
5 |
5 |
6 | o 6:0e4064ab11a3 E branch: branch2
6 | o 6:0e4064ab11a3 E branch: branch2
7 | |
7 | |
8 | o 5:5ac035cb5d8f D branch: branch2
8 | o 5:5ac035cb5d8f D branch: branch2
9 | |
9 | |
10 | | o 4:8e66061486ee C branch: branch2
10 | | o 4:8e66061486ee C branch: branch2
11 | | |
11 | | |
12 +---o 3:99567862abbe Branch2 branch: branch2
12 +---o 3:99567862abbe Branch2 branch: branch2
13 | |
13 | |
14 | o 2:65a26a4d12f6 B branch: branch1
14 | o 2:65a26a4d12f6 B branch: branch1
15 | |
15 | |
16 | o 1:0f3f3010ee16 Branch1 branch: branch1
16 | o 1:0f3f3010ee16 Branch1 branch: branch1
17 |/
17 |/
18 o 0:1994f17a630e A branch:
18 o 0:1994f17a630e A branch:
19
19
20
20
21 % Branches
21 % Branches
22 branch3 8:c11d5b3e9c00
22 branch3 8:c11d5b3e9c00
23 branch2 6:0e4064ab11a3
23 branch2 6:0e4064ab11a3
24 branch1 2:65a26a4d12f6 (inactive)
24 branch1 2:65a26a4d12f6 (inactive)
25 default 0:1994f17a630e (inactive)
25 default 0:1994f17a630e (inactive)
26
26
27 % Heads
27 % Heads
28 8:c11d5b3e9c00 F branch: branch3
28 8:c11d5b3e9c00 F branch: branch3
29 6:0e4064ab11a3 E branch: branch2
29 6:0e4064ab11a3 E branch: branch2
30 4:8e66061486ee C branch: branch2
30 4:8e66061486ee C branch: branch2
31 2:65a26a4d12f6 B branch: branch1
31 2:65a26a4d12f6 B branch: branch1
32 0:1994f17a630e A branch:
32 0:1994f17a630e A branch:
33
33
34 % Rebase part of branch2 (5-6) onto branch3 (8)
34 % Rebase part of branch2 (5-6) onto branch3 (8)
35 saved backup bundle to
35 saved backup bundle to
36 adding branch
37 adding changesets
38 adding manifests
39 adding file changes
40 added 4 changesets with 3 changes to 3 files (+1 heads)
41 rebase completed
36 rebase completed
42
37
43 % Branches
38 % Branches
44 branch3 8:c9bfa9beb84e
39 branch3 8:c9bfa9beb84e
45 branch2 4:8e66061486ee
40 branch2 4:8e66061486ee
46 branch1 2:65a26a4d12f6
41 branch1 2:65a26a4d12f6
47 default 0:1994f17a630e (inactive)
42 default 0:1994f17a630e (inactive)
48
43
49 % Heads
44 % Heads
50 8:c9bfa9beb84e E branch: branch3
45 8:c9bfa9beb84e E branch: branch3
51 4:8e66061486ee C branch: branch2
46 4:8e66061486ee C branch: branch2
52 2:65a26a4d12f6 B branch: branch1
47 2:65a26a4d12f6 B branch: branch1
53 0:1994f17a630e A branch:
48 0:1994f17a630e A branch:
54
49
55 @ 8:c9bfa9beb84e E branch: branch3
50 @ 8:c9bfa9beb84e E branch: branch3
56 |
51 |
57 o 7:bf9037384081 D branch: branch3
52 o 7:bf9037384081 D branch: branch3
58 |
53 |
59 o 6:c11d5b3e9c00 F branch: branch3
54 o 6:c11d5b3e9c00 F branch: branch3
60 |
55 |
61 o 5:33c9da881988 Branch3 branch: branch3
56 o 5:33c9da881988 Branch3 branch: branch3
62 |
57 |
63 | o 4:8e66061486ee C branch: branch2
58 | o 4:8e66061486ee C branch: branch2
64 | |
59 | |
65 | o 3:99567862abbe Branch2 branch: branch2
60 | o 3:99567862abbe Branch2 branch: branch2
66 |/
61 |/
67 | o 2:65a26a4d12f6 B branch: branch1
62 | o 2:65a26a4d12f6 B branch: branch1
68 | |
63 | |
69 | o 1:0f3f3010ee16 Branch1 branch: branch1
64 | o 1:0f3f3010ee16 Branch1 branch: branch1
70 |/
65 |/
71 o 0:1994f17a630e A branch:
66 o 0:1994f17a630e A branch:
72
67
73
68
74 % Rebase head of branch3 (8) onto branch2 (6)
69 % Rebase head of branch3 (8) onto branch2 (6)
75 @ 8:c11d5b3e9c00 F branch: branch3
70 @ 8:c11d5b3e9c00 F branch: branch3
76 |
71 |
77 o 7:33c9da881988 Branch3 branch: branch3
72 o 7:33c9da881988 Branch3 branch: branch3
78 |
73 |
79 | o 6:0e4064ab11a3 E branch: branch2
74 | o 6:0e4064ab11a3 E branch: branch2
80 | |
75 | |
81 | o 5:5ac035cb5d8f D branch: branch2
76 | o 5:5ac035cb5d8f D branch: branch2
82 | |
77 | |
83 | | o 4:8e66061486ee C branch: branch2
78 | | o 4:8e66061486ee C branch: branch2
84 | | |
79 | | |
85 +---o 3:99567862abbe Branch2 branch: branch2
80 +---o 3:99567862abbe Branch2 branch: branch2
86 | |
81 | |
87 | o 2:65a26a4d12f6 B branch: branch1
82 | o 2:65a26a4d12f6 B branch: branch1
88 | |
83 | |
89 | o 1:0f3f3010ee16 Branch1 branch: branch1
84 | o 1:0f3f3010ee16 Branch1 branch: branch1
90 |/
85 |/
91 o 0:1994f17a630e A branch:
86 o 0:1994f17a630e A branch:
92
87
93 saved backup bundle to
88 saved backup bundle to
94 adding branch
95 adding changesets
96 adding manifests
97 adding file changes
98 added 1 changesets with 1 changes to 1 files
99 rebase completed
89 rebase completed
100
90
101 % Branches
91 % Branches
102 branch2 8:b44d3024f247
92 branch2 8:b44d3024f247
103 branch3 7:33c9da881988
93 branch3 7:33c9da881988
104 branch1 2:65a26a4d12f6 (inactive)
94 branch1 2:65a26a4d12f6 (inactive)
105 default 0:1994f17a630e (inactive)
95 default 0:1994f17a630e (inactive)
106
96
107 % Heads
97 % Heads
108 8:b44d3024f247 F branch: branch2
98 8:b44d3024f247 F branch: branch2
109 7:33c9da881988 Branch3 branch: branch3
99 7:33c9da881988 Branch3 branch: branch3
110 4:8e66061486ee C branch: branch2
100 4:8e66061486ee C branch: branch2
111 2:65a26a4d12f6 B branch: branch1
101 2:65a26a4d12f6 B branch: branch1
112 0:1994f17a630e A branch:
102 0:1994f17a630e A branch:
113
103
114 @ 8:b44d3024f247 F branch: branch2
104 @ 8:b44d3024f247 F branch: branch2
115 |
105 |
116 | o 7:33c9da881988 Branch3 branch: branch3
106 | o 7:33c9da881988 Branch3 branch: branch3
117 | |
107 | |
118 o | 6:0e4064ab11a3 E branch: branch2
108 o | 6:0e4064ab11a3 E branch: branch2
119 | |
109 | |
120 o | 5:5ac035cb5d8f D branch: branch2
110 o | 5:5ac035cb5d8f D branch: branch2
121 | |
111 | |
122 | | o 4:8e66061486ee C branch: branch2
112 | | o 4:8e66061486ee C branch: branch2
123 | | |
113 | | |
124 | | o 3:99567862abbe Branch2 branch: branch2
114 | | o 3:99567862abbe Branch2 branch: branch2
125 | |/
115 | |/
126 o | 2:65a26a4d12f6 B branch: branch1
116 o | 2:65a26a4d12f6 B branch: branch1
127 | |
117 | |
128 o | 1:0f3f3010ee16 Branch1 branch: branch1
118 o | 1:0f3f3010ee16 Branch1 branch: branch1
129 |/
119 |/
130 o 0:1994f17a630e A branch:
120 o 0:1994f17a630e A branch:
131
121
132
122
133 % Rebase entire branch3 (7-8) onto branch2 (6)
123 % Rebase entire branch3 (7-8) onto branch2 (6)
134 @ 8:c11d5b3e9c00 F branch: branch3
124 @ 8:c11d5b3e9c00 F branch: branch3
135 |
125 |
136 o 7:33c9da881988 Branch3 branch: branch3
126 o 7:33c9da881988 Branch3 branch: branch3
137 |
127 |
138 | o 6:0e4064ab11a3 E branch: branch2
128 | o 6:0e4064ab11a3 E branch: branch2
139 | |
129 | |
140 | o 5:5ac035cb5d8f D branch: branch2
130 | o 5:5ac035cb5d8f D branch: branch2
141 | |
131 | |
142 | | o 4:8e66061486ee C branch: branch2
132 | | o 4:8e66061486ee C branch: branch2
143 | | |
133 | | |
144 +---o 3:99567862abbe Branch2 branch: branch2
134 +---o 3:99567862abbe Branch2 branch: branch2
145 | |
135 | |
146 | o 2:65a26a4d12f6 B branch: branch1
136 | o 2:65a26a4d12f6 B branch: branch1
147 | |
137 | |
148 | o 1:0f3f3010ee16 Branch1 branch: branch1
138 | o 1:0f3f3010ee16 Branch1 branch: branch1
149 |/
139 |/
150 o 0:1994f17a630e A branch:
140 o 0:1994f17a630e A branch:
151
141
152 saved backup bundle to
142 saved backup bundle to
153 adding branch
154 adding changesets
155 adding manifests
156 adding file changes
157 added 1 changesets with 1 changes to 1 files
158 rebase completed
143 rebase completed
159
144
160 % Branches
145 % Branches
161 branch2 7:b44d3024f247
146 branch2 7:b44d3024f247
162 branch1 2:65a26a4d12f6 (inactive)
147 branch1 2:65a26a4d12f6 (inactive)
163 default 0:1994f17a630e (inactive)
148 default 0:1994f17a630e (inactive)
164
149
165 % Heads
150 % Heads
166 7:b44d3024f247 F branch: branch2
151 7:b44d3024f247 F branch: branch2
167 4:8e66061486ee C branch: branch2
152 4:8e66061486ee C branch: branch2
168 2:65a26a4d12f6 B branch: branch1
153 2:65a26a4d12f6 B branch: branch1
169 0:1994f17a630e A branch:
154 0:1994f17a630e A branch:
170
155
171 @ 7:b44d3024f247 F branch: branch2
156 @ 7:b44d3024f247 F branch: branch2
172 |
157 |
173 o 6:0e4064ab11a3 E branch: branch2
158 o 6:0e4064ab11a3 E branch: branch2
174 |
159 |
175 o 5:5ac035cb5d8f D branch: branch2
160 o 5:5ac035cb5d8f D branch: branch2
176 |
161 |
177 | o 4:8e66061486ee C branch: branch2
162 | o 4:8e66061486ee C branch: branch2
178 | |
163 | |
179 | o 3:99567862abbe Branch2 branch: branch2
164 | o 3:99567862abbe Branch2 branch: branch2
180 | |
165 | |
181 o | 2:65a26a4d12f6 B branch: branch1
166 o | 2:65a26a4d12f6 B branch: branch1
182 | |
167 | |
183 o | 1:0f3f3010ee16 Branch1 branch: branch1
168 o | 1:0f3f3010ee16 Branch1 branch: branch1
184 |/
169 |/
185 o 0:1994f17a630e A branch:
170 o 0:1994f17a630e A branch:
186
171
@@ -1,76 +1,71 b''
1
1
2 % - Rebasing B onto E - check keep
2 % - Rebasing B onto E - check keep
3 @ 5:F:notdefault
3 @ 5:F:notdefault
4 |
4 |
5 | o 4:E:
5 | o 4:E:
6 | |
6 | |
7 | o 3:D:
7 | o 3:D:
8 |/
8 |/
9 | o 2:C:
9 | o 2:C:
10 | |
10 | |
11 | o 1:B:
11 | o 1:B:
12 |/
12 |/
13 o 0:A:
13 o 0:A:
14
14
15 warning: conflicts during merge.
15 warning: conflicts during merge.
16 merging A failed!
16 merging A failed!
17 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
17 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
18 merging A
18 merging A
19
19
20 % - Solve the conflict and go on
20 % - Solve the conflict and go on
21 rebase completed
21 rebase completed
22 @ 7:C:
22 @ 7:C:
23 |
23 |
24 o 6:B:
24 o 6:B:
25 |
25 |
26 | o 5:F:notdefault
26 | o 5:F:notdefault
27 | |
27 | |
28 o | 4:E:
28 o | 4:E:
29 | |
29 | |
30 o | 3:D:
30 o | 3:D:
31 |/
31 |/
32 | o 2:C:
32 | o 2:C:
33 | |
33 | |
34 | o 1:B:
34 | o 1:B:
35 |/
35 |/
36 o 0:A:
36 o 0:A:
37
37
38
38
39 % - Rebase F onto E - check keepbranches
39 % - Rebase F onto E - check keepbranches
40 @ 5:F:notdefault
40 @ 5:F:notdefault
41 |
41 |
42 | o 4:E:
42 | o 4:E:
43 | |
43 | |
44 | o 3:D:
44 | o 3:D:
45 |/
45 |/
46 | o 2:C:
46 | o 2:C:
47 | |
47 | |
48 | o 1:B:
48 | o 1:B:
49 |/
49 |/
50 o 0:A:
50 o 0:A:
51
51
52 warning: conflicts during merge.
52 warning: conflicts during merge.
53 merging A failed!
53 merging A failed!
54 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
54 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
55 merging A
55 merging A
56
56
57 % - Solve the conflict and go on
57 % - Solve the conflict and go on
58 saved backup bundle to
58 saved backup bundle to
59 adding branch
60 adding changesets
61 adding manifests
62 adding file changes
63 added 1 changesets with 1 changes to 1 files
64 rebase completed
59 rebase completed
65 @ 5:F:notdefault
60 @ 5:F:notdefault
66 |
61 |
67 o 4:E:
62 o 4:E:
68 |
63 |
69 o 3:D:
64 o 3:D:
70 |
65 |
71 | o 2:C:
66 | o 2:C:
72 | |
67 | |
73 | o 1:B:
68 | o 1:B:
74 |/
69 |/
75 o 0:A:
70 o 0:A:
76
71
@@ -1,215 +1,190 b''
1 @ 7: H
1 @ 7: H
2 |
2 |
3 | o 6: G
3 | o 6: G
4 |/|
4 |/|
5 o | 5: F
5 o | 5: F
6 | |
6 | |
7 | o 4: E
7 | o 4: E
8 |/
8 |/
9 | o 3: D
9 | o 3: D
10 | |
10 | |
11 | o 2: C
11 | o 2: C
12 | |
12 | |
13 | o 1: B
13 | o 1: B
14 |/
14 |/
15 o 0: A
15 o 0: A
16
16
17 % Rebasing B onto H
17 % Rebasing B onto H
18 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
18 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
19 saved backup bundle to
19 saved backup bundle to
20 adding branch
21 adding changesets
22 adding manifests
23 adding file changes
24 added 5 changesets with 6 changes to 6 files (+1 heads)
25 rebase completed
20 rebase completed
26 @ 5: Collapsed revision
21 @ 5: Collapsed revision
27 | * B
22 | * B
28 | * C
23 | * C
29 | * D
24 | * D
30 o 4: H
25 o 4: H
31 |
26 |
32 | o 3: G
27 | o 3: G
33 |/|
28 |/|
34 o | 2: F
29 o | 2: F
35 | |
30 | |
36 | o 1: E
31 | o 1: E
37 |/
32 |/
38 o 0: A
33 o 0: A
39
34
40 Expected A, B, C, D, F, H
35 Expected A, B, C, D, F, H
41 A
36 A
42 B
37 B
43 C
38 C
44 D
39 D
45 F
40 F
46 H
41 H
47
42
48 % Rebasing G onto H
43 % Rebasing G onto H
49 saved backup bundle to
44 saved backup bundle to
50 adding branch
51 adding changesets
52 adding manifests
53 adding file changes
54 added 3 changesets with 3 changes to 3 files (+1 heads)
55 rebase completed
45 rebase completed
56 @ 6: Collapsed revision
46 @ 6: Collapsed revision
57 | * E
47 | * E
58 | * G
48 | * G
59 o 5: H
49 o 5: H
60 |
50 |
61 o 4: F
51 o 4: F
62 |
52 |
63 | o 3: D
53 | o 3: D
64 | |
54 | |
65 | o 2: C
55 | o 2: C
66 | |
56 | |
67 | o 1: B
57 | o 1: B
68 |/
58 |/
69 o 0: A
59 o 0: A
70
60
71 Expected A, E, F, H
61 Expected A, E, F, H
72 A
62 A
73 E
63 E
74 F
64 F
75 H
65 H
76
66
77 @ 7: H
67 @ 7: H
78 |
68 |
79 | o 6: G
69 | o 6: G
80 | |\
70 | |\
81 | | o 5: F
71 | | o 5: F
82 | | |
72 | | |
83 | | o 4: E
73 | | o 4: E
84 | | |
74 | | |
85 | o | 3: D
75 | o | 3: D
86 | |\|
76 | |\|
87 | o | 2: C
77 | o | 2: C
88 |/ /
78 |/ /
89 | o 1: B
79 | o 1: B
90 |/
80 |/
91 o 0: A
81 o 0: A
92
82
93
83
94 % Rebase and collapse - more than one external (fail)
84 % Rebase and collapse - more than one external (fail)
95 abort: unable to collapse, there is more than one external parent
85 abort: unable to collapse, there is more than one external parent
96
86
97 % Rebase and collapse - E onto H
87 % Rebase and collapse - E onto H
98 saved backup bundle to
88 saved backup bundle to
99 adding branch
100 adding changesets
101 adding manifests
102 adding file changes
103 added 2 changesets with 3 changes to 3 files
104 rebase completed
89 rebase completed
105 @ 5: Collapsed revision
90 @ 5: Collapsed revision
106 |\ * E
91 |\ * E
107 | | * F
92 | | * F
108 | | * G
93 | | * G
109 | o 4: H
94 | o 4: H
110 | |
95 | |
111 o | 3: D
96 o | 3: D
112 |\ \
97 |\ \
113 | o | 2: C
98 | o | 2: C
114 | |/
99 | |/
115 o / 1: B
100 o / 1: B
116 |/
101 |/
117 o 0: A
102 o 0: A
118
103
119 Expected A, B, C, E, F, H
104 Expected A, B, C, E, F, H
120 A
105 A
121 B
106 B
122 C
107 C
123 E
108 E
124 F
109 F
125 H
110 H
126
111
127 @ 8: I
112 @ 8: I
128 |
113 |
129 | o 7: H
114 | o 7: H
130 | |\
115 | |\
131 | | o 6: G
116 | | o 6: G
132 | | |
117 | | |
133 | | o 5: F
118 | | o 5: F
134 | | |
119 | | |
135 | | o 4: E
120 | | o 4: E
136 | | |
121 | | |
137 | o | 3: D
122 | o | 3: D
138 | |\|
123 | |\|
139 | o | 2: C
124 | o | 2: C
140 |/ /
125 |/ /
141 | o 1: B
126 | o 1: B
142 |/
127 |/
143 o 0: A
128 o 0: A
144
129
145
130
146 % Rebase and collapse - E onto I
131 % Rebase and collapse - E onto I
147 merging E
132 merging E
148 saved backup bundle to
133 saved backup bundle to
149 adding branch
150 adding changesets
151 adding manifests
152 adding file changes
153 added 2 changesets with 3 changes to 3 files
154 rebase completed
134 rebase completed
155 @ 5: Collapsed revision
135 @ 5: Collapsed revision
156 |\ * E
136 |\ * E
157 | | * F
137 | | * F
158 | | * G
138 | | * G
159 | | * H
139 | | * H
160 | o 4: I
140 | o 4: I
161 | |
141 | |
162 o | 3: D
142 o | 3: D
163 |\ \
143 |\ \
164 | o | 2: C
144 | o | 2: C
165 | |/
145 | |/
166 o / 1: B
146 o / 1: B
167 |/
147 |/
168 o 0: A
148 o 0: A
169
149
170 Expected A, B, C, E, G, I
150 Expected A, B, C, E, G, I
171 A
151 A
172 B
152 B
173 C
153 C
174 E
154 E
175 G
155 G
176 I
156 I
177 Cat E:
157 Cat E:
178 F
158 F
179
159
180 @ 5: F
160 @ 5: F
181 |
161 |
182 | o 4: E
162 | o 4: E
183 | |\
163 | |\
184 | | o 3: D
164 | | o 3: D
185 | | |
165 | | |
186 | o | 2: C
166 | o | 2: C
187 | |/
167 | |/
188 | o 1: B
168 | o 1: B
189 |/
169 |/
190 o 0: A
170 o 0: A
191
171
192
172
193 % Rebase and collapse - B onto F
173 % Rebase and collapse - B onto F
194 saved backup bundle to
174 saved backup bundle to
195 adding branch
196 adding changesets
197 adding manifests
198 adding file changes
199 added 2 changesets with 4 changes to 4 files
200 rebase completed
175 rebase completed
201 @ 2: Collapsed revision
176 @ 2: Collapsed revision
202 | * B
177 | * B
203 | * C
178 | * C
204 | * D
179 | * D
205 | * E
180 | * E
206 o 1: F
181 o 1: F
207 |
182 |
208 o 0: A
183 o 0: A
209
184
210 Expected A, B, C, D, F
185 Expected A, B, C, D, F
211 A
186 A
212 B
187 B
213 C
188 C
214 D
189 D
215 F
190 F
@@ -1,66 +1,61 b''
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 created new head
2 created new head
3 @ 5: L3
3 @ 5: L3
4 |
4 |
5 o 4: L2
5 o 4: L2
6 |
6 |
7 o 3: L1
7 o 3: L1
8 |
8 |
9 | o 2: C3
9 | o 2: C3
10 |/
10 |/
11 o 1: C2
11 o 1: C2
12 |
12 |
13 o 0: C1
13 o 0: C1
14
14
15
15
16 % Try to call --continue
16 % Try to call --continue
17 abort: no rebase in progress
17 abort: no rebase in progress
18
18
19 % Conflicting rebase
19 % Conflicting rebase
20 merging common
20 merging common
21 warning: conflicts during merge.
21 warning: conflicts during merge.
22 merging common failed!
22 merging common failed!
23 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
23 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
24
24
25 % Try to continue without solving the conflict
25 % Try to continue without solving the conflict
26 abort: unresolved merge conflicts (see hg resolve)
26 abort: unresolved merge conflicts (see hg resolve)
27
27
28 % Conclude rebase
28 % Conclude rebase
29 saved backup bundle to
29 saved backup bundle to
30 adding branch
31 adding changesets
32 adding manifests
33 adding file changes
34 added 3 changesets with 3 changes to 3 files
35 rebase completed
30 rebase completed
36 @ 5: L3
31 @ 5: L3
37 |
32 |
38 o 4: L2
33 o 4: L2
39 |
34 |
40 o 3: L1
35 o 3: L1
41 |
36 |
42 o 2: C3
37 o 2: C3
43 |
38 |
44 o 1: C2
39 o 1: C2
45 |
40 |
46 o 0: C1
41 o 0: C1
47
42
48
43
49 % Check correctness
44 % Check correctness
50 - Rev. 0
45 - Rev. 0
51 c1
46 c1
52 - Rev. 1
47 - Rev. 1
53 c1
48 c1
54 c2
49 c2
55 - Rev. 2
50 - Rev. 2
56 c1
51 c1
57 c2
52 c2
58 c3
53 c3
59 - Rev. 3
54 - Rev. 3
60 c1
55 c1
61 c2
56 c2
62 c3
57 c3
63 - Rev. 4
58 - Rev. 4
64 resolved merge
59 resolved merge
65 - Rev. 5
60 - Rev. 5
66 resolved merge
61 resolved merge
@@ -1,134 +1,114 b''
1 @ 4: E
1 @ 4: E
2 |
2 |
3 | o 3: D
3 | o 3: D
4 | |
4 | |
5 | o 2: C
5 | o 2: C
6 | |
6 | |
7 | o 1: B
7 | o 1: B
8 |/
8 |/
9 o 0: A
9 o 0: A
10
10
11 % Rebasing D onto E detaching from C
11 % Rebasing D onto E detaching from C
12 saved backup bundle to
12 saved backup bundle to
13 adding branch
14 adding changesets
15 adding manifests
16 adding file changes
17 added 2 changesets with 2 changes to 2 files (+1 heads)
18 rebase completed
13 rebase completed
19 @ 4: D
14 @ 4: D
20 |
15 |
21 o 3: E
16 o 3: E
22 |
17 |
23 | o 2: C
18 | o 2: C
24 | |
19 | |
25 | o 1: B
20 | o 1: B
26 |/
21 |/
27 o 0: A
22 o 0: A
28
23
29 Expected A, D, E
24 Expected A, D, E
30 A
25 A
31 D
26 D
32 E
27 E
33
28
34 @ 4: E
29 @ 4: E
35 |
30 |
36 | o 3: D
31 | o 3: D
37 | |
32 | |
38 | o 2: C
33 | o 2: C
39 | |
34 | |
40 | o 1: B
35 | o 1: B
41 |/
36 |/
42 o 0: A
37 o 0: A
43
38
44 % Rebasing C onto E detaching from B
39 % Rebasing C onto E detaching from B
45 saved backup bundle to
40 saved backup bundle to
46 adding branch
47 adding changesets
48 adding manifests
49 adding file changes
50 added 3 changesets with 3 changes to 3 files (+1 heads)
51 rebase completed
41 rebase completed
52 @ 4: D
42 @ 4: D
53 |
43 |
54 o 3: C
44 o 3: C
55 |
45 |
56 o 2: E
46 o 2: E
57 |
47 |
58 | o 1: B
48 | o 1: B
59 |/
49 |/
60 o 0: A
50 o 0: A
61
51
62 Expected A, C, D, E
52 Expected A, C, D, E
63 A
53 A
64 C
54 C
65 D
55 D
66 E
56 E
67
57
68 @ 4: E
58 @ 4: E
69 |
59 |
70 | o 3: D
60 | o 3: D
71 | |
61 | |
72 | o 2: C
62 | o 2: C
73 | |
63 | |
74 | o 1: B
64 | o 1: B
75 |/
65 |/
76 o 0: A
66 o 0: A
77
67
78 % Rebasing B onto E using detach (same as not using it)
68 % Rebasing B onto E using detach (same as not using it)
79 saved backup bundle to
69 saved backup bundle to
80 adding branch
81 adding changesets
82 adding manifests
83 adding file changes
84 added 4 changesets with 4 changes to 4 files
85 rebase completed
70 rebase completed
86 @ 4: D
71 @ 4: D
87 |
72 |
88 o 3: C
73 o 3: C
89 |
74 |
90 o 2: B
75 o 2: B
91 |
76 |
92 o 1: E
77 o 1: E
93 |
78 |
94 o 0: A
79 o 0: A
95
80
96 Expected A, B, C, D, E
81 Expected A, B, C, D, E
97 A
82 A
98 B
83 B
99 C
84 C
100 D
85 D
101 E
86 E
102
87
103 @ 4: E
88 @ 4: E
104 |
89 |
105 | o 3: D
90 | o 3: D
106 | |
91 | |
107 | o 2: C
92 | o 2: C
108 | |
93 | |
109 | o 1: B
94 | o 1: B
110 |/
95 |/
111 o 0: A
96 o 0: A
112
97
113 % Rebasing C onto E detaching from B and collapsing
98 % Rebasing C onto E detaching from B and collapsing
114 saved backup bundle to
99 saved backup bundle to
115 adding branch
116 adding changesets
117 adding manifests
118 adding file changes
119 added 2 changesets with 3 changes to 3 files (+1 heads)
120 rebase completed
100 rebase completed
121 @ 3: Collapsed revision
101 @ 3: Collapsed revision
122 | * C
102 | * C
123 | * D
103 | * D
124 o 2: E
104 o 2: E
125 |
105 |
126 | o 1: B
106 | o 1: B
127 |/
107 |/
128 o 0: A
108 o 0: A
129
109
130 Expected A, C, D, E
110 Expected A, C, D, E
131 A
111 A
132 C
112 C
133 D
113 D
134 E
114 E
@@ -1,64 +1,54 b''
1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2 created new head
2 created new head
3 @ 4:r2
3 @ 4:r2
4 |
4 |
5 o 3:r1
5 o 3:r1
6 |
6 |
7 | o 2:l1
7 | o 2:l1
8 |/
8 |/
9 o 1:c2
9 o 1:c2
10 |
10 |
11 o 0:c1
11 o 0:c1
12
12
13
13
14 % Rebase with no arguments - single revision in source branch
14 % Rebase with no arguments - single revision in source branch
15 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
15 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
16 saved backup bundle to
16 saved backup bundle to
17 adding branch
18 adding changesets
19 adding manifests
20 adding file changes
21 added 3 changesets with 3 changes to 3 files
22 rebase completed
17 rebase completed
23 @ 4:l1
18 @ 4:l1
24 |
19 |
25 o 3:r2
20 o 3:r2
26 |
21 |
27 o 2:r1
22 o 2:r1
28 |
23 |
29 o 1:c2
24 o 1:c2
30 |
25 |
31 o 0:c1
26 o 0:c1
32
27
33 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
28 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
34 created new head
29 created new head
35 @ 4:r1
30 @ 4:r1
36 |
31 |
37 | o 3:l2
32 | o 3:l2
38 | |
33 | |
39 | o 2:l1
34 | o 2:l1
40 |/
35 |/
41 o 1:c2
36 o 1:c2
42 |
37 |
43 o 0:c1
38 o 0:c1
44
39
45
40
46 % Rebase with no arguments - single revision in target branch
41 % Rebase with no arguments - single revision in target branch
47 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
42 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
48 saved backup bundle to
43 saved backup bundle to
49 adding branch
50 adding changesets
51 adding manifests
52 adding file changes
53 added 3 changesets with 3 changes to 3 files
54 rebase completed
44 rebase completed
55 @ 4:l2
45 @ 4:l2
56 |
46 |
57 o 3:l1
47 o 3:l1
58 |
48 |
59 o 2:r1
49 o 2:r1
60 |
50 |
61 o 1:c2
51 o 1:c2
62 |
52 |
63 o 0:c1
53 o 0:c1
64
54
@@ -1,23 +1,18 b''
1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2
2
3 % "Mainstream" import p1.patch
3 % "Mainstream" import p1.patch
4 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
4 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
5 applying p1.patch
5 applying p1.patch
6
6
7 % Rebase
7 % Rebase
8 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
8 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
9 saved backup bundle to
9 saved backup bundle to
10 adding branch
11 adding changesets
12 adding manifests
13 adding file changes
14 added 2 changesets with 2 changes to 2 files
15 rebase completed
10 rebase completed
16 @ 3 P0 tags: p0.patch qbase qtip tip
11 @ 3 P0 tags: p0.patch qbase qtip tip
17 |
12 |
18 o 2 P1 tags: qparent
13 o 2 P1 tags: qparent
19 |
14 |
20 o 1 R1 tags:
15 o 1 R1 tags:
21 |
16 |
22 o 0 C1 tags:
17 o 0 C1 tags:
23
18
@@ -1,138 +1,133 b''
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 @ 3 P1 tags: f2.patch qtip tip
2 @ 3 P1 tags: f2.patch qtip tip
3 |
3 |
4 o 2 P0 tags: f.patch qbase
4 o 2 P0 tags: f.patch qbase
5 |
5 |
6 | o 1 R1 tags:
6 | o 1 R1 tags:
7 |/
7 |/
8 o 0 C1 tags: qparent
8 o 0 C1 tags: qparent
9
9
10
10
11 % Rebase - try to rebase on an applied mq patch
11 % Rebase - try to rebase on an applied mq patch
12 abort: cannot rebase onto an applied mq patch
12 abort: cannot rebase onto an applied mq patch
13
13
14 % Rebase - same thing, but mq patch is default dest
14 % Rebase - same thing, but mq patch is default dest
15 abort: cannot rebase onto an applied mq patch
15 abort: cannot rebase onto an applied mq patch
16
16
17 % Rebase - generate a conflict
17 % Rebase - generate a conflict
18 merging f
18 merging f
19 warning: conflicts during merge.
19 warning: conflicts during merge.
20 merging f failed!
20 merging f failed!
21 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
21 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
22
22
23 % Fix the 1st conflict
23 % Fix the 1st conflict
24 warning: conflicts during merge.
24 warning: conflicts during merge.
25 merging f failed!
25 merging f failed!
26 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
26 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
27 merging f
27 merging f
28
28
29 % Fix the 2nd conflict
29 % Fix the 2nd conflict
30 saved backup bundle to
30 saved backup bundle to
31 adding branch
32 adding changesets
33 adding manifests
34 adding file changes
35 added 2 changesets with 2 changes to 1 files
36 rebase completed
31 rebase completed
37 @ 3 P1 tags: f2.patch qtip tip
32 @ 3 P1 tags: f2.patch qtip tip
38 |
33 |
39 o 2 P0 tags: f.patch qbase
34 o 2 P0 tags: f.patch qbase
40 |
35 |
41 o 1 R1 tags: qparent
36 o 1 R1 tags: qparent
42 |
37 |
43 o 0 C1 tags:
38 o 0 C1 tags:
44
39
45
40
46 % Update to qbase
41 % Update to qbase
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 % f correctly reflects the merge result
43 % f correctly reflects the merge result
49 mq1r1
44 mq1r1
50 % And the patch is correct
45 % And the patch is correct
51 # HG changeset patch
46 # HG changeset patch
52 # User test
47 # User test
53 # Date
48 # Date
54 # Node ID
49 # Node ID
55 # Parent
50 # Parent
56 P0
51 P0
57
52
58 diff -r x -r y f
53 diff -r x -r y f
59 --- a/f
54 --- a/f
60 +++ b/f
55 +++ b/f
61 @@ -1,1 +1,1 @@
56 @@ -1,1 +1,1 @@
62 -r1
57 -r1
63 +mq1r1
58 +mq1r1
64
59
65 % Update to qtip
60 % Update to qtip
66 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 % f correctly reflects the merge result
62 % f correctly reflects the merge result
68 mq1r1mq2
63 mq1r1mq2
69 % And the patch is correct
64 % And the patch is correct
70 # HG changeset patch
65 # HG changeset patch
71 # User test
66 # User test
72 # Date
67 # Date
73 # Node ID
68 # Node ID
74 # Parent
69 # Parent
75 P1
70 P1
76
71
77 diff -r x -r y f
72 diff -r x -r y f
78 --- a/f
73 --- a/f
79 +++ b/f
74 +++ b/f
80 @@ -1,1 +1,1 @@
75 @@ -1,1 +1,1 @@
81 -mq1r1
76 -mq1r1
82 +mq1r1mq2
77 +mq1r1mq2
83
78
84 % Adding one git-style patch and one normal
79 % Adding one git-style patch and one normal
85 popping f2.patch
80 popping f2.patch
86 popping f.patch
81 popping f.patch
87 patch queue now empty
82 patch queue now empty
88 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 % Git patch
84 % Git patch
90 P0 (git)
85 P0 (git)
91
86
92 diff --git a/p b/p
87 diff --git a/p b/p
93 new file mode 100644
88 new file mode 100644
94 --- /dev/null
89 --- /dev/null
95 +++ b/p
90 +++ b/p
96 @@ -0,0 +1,1 @@
91 @@ -0,0 +1,1 @@
97 +mq1
92 +mq1
98
93
99 % Normal patch
94 % Normal patch
100 P1
95 P1
101
96
102 diff -r x p
97 diff -r x p
103 --- a/p
98 --- a/p
104 +++ b/p
99 +++ b/p
105 @@ -1,1 +1,1 @@
100 @@ -1,1 +1,1 @@
106 -mq1
101 -mq1
107 +mq2
102 +mq2
108
103
109 % Rebase the applied mq patches
104 % Rebase the applied mq patches
110 % And the patches are correct
105 % And the patches are correct
111 % Git patch
106 % Git patch
112 # HG changeset patch
107 # HG changeset patch
113 # User test
108 # User test
114 # Date
109 # Date
115 # Node ID
110 # Node ID
116 # Parent
111 # Parent
117 P0 (git)
112 P0 (git)
118
113
119 diff --git a/p b/p
114 diff --git a/p b/p
120 new file mode 100644
115 new file mode 100644
121 --- /dev/null
116 --- /dev/null
122 +++ b/p
117 +++ b/p
123 @@ -0,0 +1,1 @@
118 @@ -0,0 +1,1 @@
124 +mq1
119 +mq1
125
120
126 % Normal patch
121 % Normal patch
127 # HG changeset patch
122 # HG changeset patch
128 # User test
123 # User test
129 # Date
124 # Date
130 # Node ID
125 # Node ID
131 # Parent
126 # Parent
132 P1
127 P1
133
128
134 --- a/p
129 --- a/p
135 +++ b/p
130 +++ b/p
136 @@ -1,1 +1,1 @@
131 @@ -1,1 +1,1 @@
137 -mq1
132 -mq1
138 +mq2
133 +mq2
@@ -1,344 +1,304 b''
1 % These fail
1 % These fail
2
2
3 % Use continue and abort
3 % Use continue and abort
4 hg rebase: cannot use both abort and continue
4 hg rebase: cannot use both abort and continue
5 hg rebase [-s REV | -b REV] [-d REV] [options]
5 hg rebase [-s REV | -b REV] [-d REV] [options]
6 hg rebase {-a|-c}
6 hg rebase {-a|-c}
7
7
8 move changeset (and descendants) to a different branch
8 move changeset (and descendants) to a different branch
9
9
10 Rebase uses repeated merging to graft changesets from one part of history
10 Rebase uses repeated merging to graft changesets from one part of history
11 (the source) onto another (the destination). This can be useful for
11 (the source) onto another (the destination). This can be useful for
12 linearizing *local* changes relative to a master development tree.
12 linearizing *local* changes relative to a master development tree.
13
13
14 You should not rebase changesets that have already been shared with
14 You should not rebase changesets that have already been shared with
15 others. Doing so will force everybody else to perform the same rebase or
15 others. Doing so will force everybody else to perform the same rebase or
16 they will end up with duplicated changesets after pulling in your rebased
16 they will end up with duplicated changesets after pulling in your rebased
17 changesets.
17 changesets.
18
18
19 If you don't specify a destination changeset ("-d/--dest"), rebase uses
19 If you don't specify a destination changeset ("-d/--dest"), rebase uses
20 the tipmost head of the current named branch as the destination. (The
20 the tipmost head of the current named branch as the destination. (The
21 destination changeset is not modified by rebasing, but new changesets are
21 destination changeset is not modified by rebasing, but new changesets are
22 added as its descendants.)
22 added as its descendants.)
23
23
24 You can specify which changesets to rebase in two ways: as a "source"
24 You can specify which changesets to rebase in two ways: as a "source"
25 changeset or as a "base" changeset. Both are shorthand for a topologically
25 changeset or as a "base" changeset. Both are shorthand for a topologically
26 related set of changesets (the "source branch"). If you specify source
26 related set of changesets (the "source branch"). If you specify source
27 ("-s/--source"), rebase will rebase that changeset and all of its
27 ("-s/--source"), rebase will rebase that changeset and all of its
28 descendants onto dest. If you specify base ("-b/--base"), rebase will
28 descendants onto dest. If you specify base ("-b/--base"), rebase will
29 select ancestors of base back to but not including the common ancestor
29 select ancestors of base back to but not including the common ancestor
30 with dest. Thus, "-b" is less precise but more convenient than "-s": you
30 with dest. Thus, "-b" is less precise but more convenient than "-s": you
31 can specify any changeset in the source branch, and rebase will select the
31 can specify any changeset in the source branch, and rebase will select the
32 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
32 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
33 of the working directory as the base.
33 of the working directory as the base.
34
34
35 By default, rebase recreates the changesets in the source branch as
35 By default, rebase recreates the changesets in the source branch as
36 descendants of dest and then destroys the originals. Use "--keep" to
36 descendants of dest and then destroys the originals. Use "--keep" to
37 preserve the original source changesets. Some changesets in the source
37 preserve the original source changesets. Some changesets in the source
38 branch (e.g. merges from the destination branch) may be dropped if they no
38 branch (e.g. merges from the destination branch) may be dropped if they no
39 longer contribute any change.
39 longer contribute any change.
40
40
41 One result of the rules for selecting the destination changeset and source
41 One result of the rules for selecting the destination changeset and source
42 branch is that, unlike "merge", rebase will do nothing if you are at the
42 branch is that, unlike "merge", rebase will do nothing if you are at the
43 latest (tipmost) head of a named branch with two heads. You need to
43 latest (tipmost) head of a named branch with two heads. You need to
44 explicitly specify source and/or destination (or "update" to the other
44 explicitly specify source and/or destination (or "update" to the other
45 head, if it's the head of the intended source branch).
45 head, if it's the head of the intended source branch).
46
46
47 If a rebase is interrupted to manually resolve a merge, it can be
47 If a rebase is interrupted to manually resolve a merge, it can be
48 continued with --continue/-c or aborted with --abort/-a.
48 continued with --continue/-c or aborted with --abort/-a.
49
49
50 options:
50 options:
51
51
52 -s --source rebase from the specified changeset
52 -s --source rebase from the specified changeset
53 -b --base rebase from the base of the specified changeset (up to
53 -b --base rebase from the base of the specified changeset (up to
54 greatest common ancestor of base and dest)
54 greatest common ancestor of base and dest)
55 -d --dest rebase onto the specified changeset
55 -d --dest rebase onto the specified changeset
56 --collapse collapse the rebased changesets
56 --collapse collapse the rebased changesets
57 --keep keep original changesets
57 --keep keep original changesets
58 --keepbranches keep original branch names
58 --keepbranches keep original branch names
59 --detach force detaching of source from its original branch
59 --detach force detaching of source from its original branch
60 -c --continue continue an interrupted rebase
60 -c --continue continue an interrupted rebase
61 -a --abort abort an interrupted rebase
61 -a --abort abort an interrupted rebase
62 --style display using template map file
62 --style display using template map file
63 --template display with template
63 --template display with template
64
64
65 use "hg -v help rebase" to show global options
65 use "hg -v help rebase" to show global options
66
66
67 % Use continue and collapse
67 % Use continue and collapse
68 hg rebase: cannot use collapse with continue or abort
68 hg rebase: cannot use collapse with continue or abort
69 hg rebase [-s REV | -b REV] [-d REV] [options]
69 hg rebase [-s REV | -b REV] [-d REV] [options]
70 hg rebase {-a|-c}
70 hg rebase {-a|-c}
71
71
72 move changeset (and descendants) to a different branch
72 move changeset (and descendants) to a different branch
73
73
74 Rebase uses repeated merging to graft changesets from one part of history
74 Rebase uses repeated merging to graft changesets from one part of history
75 (the source) onto another (the destination). This can be useful for
75 (the source) onto another (the destination). This can be useful for
76 linearizing *local* changes relative to a master development tree.
76 linearizing *local* changes relative to a master development tree.
77
77
78 You should not rebase changesets that have already been shared with
78 You should not rebase changesets that have already been shared with
79 others. Doing so will force everybody else to perform the same rebase or
79 others. Doing so will force everybody else to perform the same rebase or
80 they will end up with duplicated changesets after pulling in your rebased
80 they will end up with duplicated changesets after pulling in your rebased
81 changesets.
81 changesets.
82
82
83 If you don't specify a destination changeset ("-d/--dest"), rebase uses
83 If you don't specify a destination changeset ("-d/--dest"), rebase uses
84 the tipmost head of the current named branch as the destination. (The
84 the tipmost head of the current named branch as the destination. (The
85 destination changeset is not modified by rebasing, but new changesets are
85 destination changeset is not modified by rebasing, but new changesets are
86 added as its descendants.)
86 added as its descendants.)
87
87
88 You can specify which changesets to rebase in two ways: as a "source"
88 You can specify which changesets to rebase in two ways: as a "source"
89 changeset or as a "base" changeset. Both are shorthand for a topologically
89 changeset or as a "base" changeset. Both are shorthand for a topologically
90 related set of changesets (the "source branch"). If you specify source
90 related set of changesets (the "source branch"). If you specify source
91 ("-s/--source"), rebase will rebase that changeset and all of its
91 ("-s/--source"), rebase will rebase that changeset and all of its
92 descendants onto dest. If you specify base ("-b/--base"), rebase will
92 descendants onto dest. If you specify base ("-b/--base"), rebase will
93 select ancestors of base back to but not including the common ancestor
93 select ancestors of base back to but not including the common ancestor
94 with dest. Thus, "-b" is less precise but more convenient than "-s": you
94 with dest. Thus, "-b" is less precise but more convenient than "-s": you
95 can specify any changeset in the source branch, and rebase will select the
95 can specify any changeset in the source branch, and rebase will select the
96 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
96 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
97 of the working directory as the base.
97 of the working directory as the base.
98
98
99 By default, rebase recreates the changesets in the source branch as
99 By default, rebase recreates the changesets in the source branch as
100 descendants of dest and then destroys the originals. Use "--keep" to
100 descendants of dest and then destroys the originals. Use "--keep" to
101 preserve the original source changesets. Some changesets in the source
101 preserve the original source changesets. Some changesets in the source
102 branch (e.g. merges from the destination branch) may be dropped if they no
102 branch (e.g. merges from the destination branch) may be dropped if they no
103 longer contribute any change.
103 longer contribute any change.
104
104
105 One result of the rules for selecting the destination changeset and source
105 One result of the rules for selecting the destination changeset and source
106 branch is that, unlike "merge", rebase will do nothing if you are at the
106 branch is that, unlike "merge", rebase will do nothing if you are at the
107 latest (tipmost) head of a named branch with two heads. You need to
107 latest (tipmost) head of a named branch with two heads. You need to
108 explicitly specify source and/or destination (or "update" to the other
108 explicitly specify source and/or destination (or "update" to the other
109 head, if it's the head of the intended source branch).
109 head, if it's the head of the intended source branch).
110
110
111 If a rebase is interrupted to manually resolve a merge, it can be
111 If a rebase is interrupted to manually resolve a merge, it can be
112 continued with --continue/-c or aborted with --abort/-a.
112 continued with --continue/-c or aborted with --abort/-a.
113
113
114 options:
114 options:
115
115
116 -s --source rebase from the specified changeset
116 -s --source rebase from the specified changeset
117 -b --base rebase from the base of the specified changeset (up to
117 -b --base rebase from the base of the specified changeset (up to
118 greatest common ancestor of base and dest)
118 greatest common ancestor of base and dest)
119 -d --dest rebase onto the specified changeset
119 -d --dest rebase onto the specified changeset
120 --collapse collapse the rebased changesets
120 --collapse collapse the rebased changesets
121 --keep keep original changesets
121 --keep keep original changesets
122 --keepbranches keep original branch names
122 --keepbranches keep original branch names
123 --detach force detaching of source from its original branch
123 --detach force detaching of source from its original branch
124 -c --continue continue an interrupted rebase
124 -c --continue continue an interrupted rebase
125 -a --abort abort an interrupted rebase
125 -a --abort abort an interrupted rebase
126 --style display using template map file
126 --style display using template map file
127 --template display with template
127 --template display with template
128
128
129 use "hg -v help rebase" to show global options
129 use "hg -v help rebase" to show global options
130
130
131 % Use continue/abort and dest/source
131 % Use continue/abort and dest/source
132 hg rebase: abort and continue do not allow specifying revisions
132 hg rebase: abort and continue do not allow specifying revisions
133 hg rebase [-s REV | -b REV] [-d REV] [options]
133 hg rebase [-s REV | -b REV] [-d REV] [options]
134 hg rebase {-a|-c}
134 hg rebase {-a|-c}
135
135
136 move changeset (and descendants) to a different branch
136 move changeset (and descendants) to a different branch
137
137
138 Rebase uses repeated merging to graft changesets from one part of history
138 Rebase uses repeated merging to graft changesets from one part of history
139 (the source) onto another (the destination). This can be useful for
139 (the source) onto another (the destination). This can be useful for
140 linearizing *local* changes relative to a master development tree.
140 linearizing *local* changes relative to a master development tree.
141
141
142 You should not rebase changesets that have already been shared with
142 You should not rebase changesets that have already been shared with
143 others. Doing so will force everybody else to perform the same rebase or
143 others. Doing so will force everybody else to perform the same rebase or
144 they will end up with duplicated changesets after pulling in your rebased
144 they will end up with duplicated changesets after pulling in your rebased
145 changesets.
145 changesets.
146
146
147 If you don't specify a destination changeset ("-d/--dest"), rebase uses
147 If you don't specify a destination changeset ("-d/--dest"), rebase uses
148 the tipmost head of the current named branch as the destination. (The
148 the tipmost head of the current named branch as the destination. (The
149 destination changeset is not modified by rebasing, but new changesets are
149 destination changeset is not modified by rebasing, but new changesets are
150 added as its descendants.)
150 added as its descendants.)
151
151
152 You can specify which changesets to rebase in two ways: as a "source"
152 You can specify which changesets to rebase in two ways: as a "source"
153 changeset or as a "base" changeset. Both are shorthand for a topologically
153 changeset or as a "base" changeset. Both are shorthand for a topologically
154 related set of changesets (the "source branch"). If you specify source
154 related set of changesets (the "source branch"). If you specify source
155 ("-s/--source"), rebase will rebase that changeset and all of its
155 ("-s/--source"), rebase will rebase that changeset and all of its
156 descendants onto dest. If you specify base ("-b/--base"), rebase will
156 descendants onto dest. If you specify base ("-b/--base"), rebase will
157 select ancestors of base back to but not including the common ancestor
157 select ancestors of base back to but not including the common ancestor
158 with dest. Thus, "-b" is less precise but more convenient than "-s": you
158 with dest. Thus, "-b" is less precise but more convenient than "-s": you
159 can specify any changeset in the source branch, and rebase will select the
159 can specify any changeset in the source branch, and rebase will select the
160 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
160 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
161 of the working directory as the base.
161 of the working directory as the base.
162
162
163 By default, rebase recreates the changesets in the source branch as
163 By default, rebase recreates the changesets in the source branch as
164 descendants of dest and then destroys the originals. Use "--keep" to
164 descendants of dest and then destroys the originals. Use "--keep" to
165 preserve the original source changesets. Some changesets in the source
165 preserve the original source changesets. Some changesets in the source
166 branch (e.g. merges from the destination branch) may be dropped if they no
166 branch (e.g. merges from the destination branch) may be dropped if they no
167 longer contribute any change.
167 longer contribute any change.
168
168
169 One result of the rules for selecting the destination changeset and source
169 One result of the rules for selecting the destination changeset and source
170 branch is that, unlike "merge", rebase will do nothing if you are at the
170 branch is that, unlike "merge", rebase will do nothing if you are at the
171 latest (tipmost) head of a named branch with two heads. You need to
171 latest (tipmost) head of a named branch with two heads. You need to
172 explicitly specify source and/or destination (or "update" to the other
172 explicitly specify source and/or destination (or "update" to the other
173 head, if it's the head of the intended source branch).
173 head, if it's the head of the intended source branch).
174
174
175 If a rebase is interrupted to manually resolve a merge, it can be
175 If a rebase is interrupted to manually resolve a merge, it can be
176 continued with --continue/-c or aborted with --abort/-a.
176 continued with --continue/-c or aborted with --abort/-a.
177
177
178 options:
178 options:
179
179
180 -s --source rebase from the specified changeset
180 -s --source rebase from the specified changeset
181 -b --base rebase from the base of the specified changeset (up to
181 -b --base rebase from the base of the specified changeset (up to
182 greatest common ancestor of base and dest)
182 greatest common ancestor of base and dest)
183 -d --dest rebase onto the specified changeset
183 -d --dest rebase onto the specified changeset
184 --collapse collapse the rebased changesets
184 --collapse collapse the rebased changesets
185 --keep keep original changesets
185 --keep keep original changesets
186 --keepbranches keep original branch names
186 --keepbranches keep original branch names
187 --detach force detaching of source from its original branch
187 --detach force detaching of source from its original branch
188 -c --continue continue an interrupted rebase
188 -c --continue continue an interrupted rebase
189 -a --abort abort an interrupted rebase
189 -a --abort abort an interrupted rebase
190 --style display using template map file
190 --style display using template map file
191 --template display with template
191 --template display with template
192
192
193 use "hg -v help rebase" to show global options
193 use "hg -v help rebase" to show global options
194
194
195 % Use source and base
195 % Use source and base
196 hg rebase: cannot specify both a revision and a base
196 hg rebase: cannot specify both a revision and a base
197 hg rebase [-s REV | -b REV] [-d REV] [options]
197 hg rebase [-s REV | -b REV] [-d REV] [options]
198 hg rebase {-a|-c}
198 hg rebase {-a|-c}
199
199
200 move changeset (and descendants) to a different branch
200 move changeset (and descendants) to a different branch
201
201
202 Rebase uses repeated merging to graft changesets from one part of history
202 Rebase uses repeated merging to graft changesets from one part of history
203 (the source) onto another (the destination). This can be useful for
203 (the source) onto another (the destination). This can be useful for
204 linearizing *local* changes relative to a master development tree.
204 linearizing *local* changes relative to a master development tree.
205
205
206 You should not rebase changesets that have already been shared with
206 You should not rebase changesets that have already been shared with
207 others. Doing so will force everybody else to perform the same rebase or
207 others. Doing so will force everybody else to perform the same rebase or
208 they will end up with duplicated changesets after pulling in your rebased
208 they will end up with duplicated changesets after pulling in your rebased
209 changesets.
209 changesets.
210
210
211 If you don't specify a destination changeset ("-d/--dest"), rebase uses
211 If you don't specify a destination changeset ("-d/--dest"), rebase uses
212 the tipmost head of the current named branch as the destination. (The
212 the tipmost head of the current named branch as the destination. (The
213 destination changeset is not modified by rebasing, but new changesets are
213 destination changeset is not modified by rebasing, but new changesets are
214 added as its descendants.)
214 added as its descendants.)
215
215
216 You can specify which changesets to rebase in two ways: as a "source"
216 You can specify which changesets to rebase in two ways: as a "source"
217 changeset or as a "base" changeset. Both are shorthand for a topologically
217 changeset or as a "base" changeset. Both are shorthand for a topologically
218 related set of changesets (the "source branch"). If you specify source
218 related set of changesets (the "source branch"). If you specify source
219 ("-s/--source"), rebase will rebase that changeset and all of its
219 ("-s/--source"), rebase will rebase that changeset and all of its
220 descendants onto dest. If you specify base ("-b/--base"), rebase will
220 descendants onto dest. If you specify base ("-b/--base"), rebase will
221 select ancestors of base back to but not including the common ancestor
221 select ancestors of base back to but not including the common ancestor
222 with dest. Thus, "-b" is less precise but more convenient than "-s": you
222 with dest. Thus, "-b" is less precise but more convenient than "-s": you
223 can specify any changeset in the source branch, and rebase will select the
223 can specify any changeset in the source branch, and rebase will select the
224 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
224 whole branch. If you specify neither "-s" nor "-b", rebase uses the parent
225 of the working directory as the base.
225 of the working directory as the base.
226
226
227 By default, rebase recreates the changesets in the source branch as
227 By default, rebase recreates the changesets in the source branch as
228 descendants of dest and then destroys the originals. Use "--keep" to
228 descendants of dest and then destroys the originals. Use "--keep" to
229 preserve the original source changesets. Some changesets in the source
229 preserve the original source changesets. Some changesets in the source
230 branch (e.g. merges from the destination branch) may be dropped if they no
230 branch (e.g. merges from the destination branch) may be dropped if they no
231 longer contribute any change.
231 longer contribute any change.
232
232
233 One result of the rules for selecting the destination changeset and source
233 One result of the rules for selecting the destination changeset and source
234 branch is that, unlike "merge", rebase will do nothing if you are at the
234 branch is that, unlike "merge", rebase will do nothing if you are at the
235 latest (tipmost) head of a named branch with two heads. You need to
235 latest (tipmost) head of a named branch with two heads. You need to
236 explicitly specify source and/or destination (or "update" to the other
236 explicitly specify source and/or destination (or "update" to the other
237 head, if it's the head of the intended source branch).
237 head, if it's the head of the intended source branch).
238
238
239 If a rebase is interrupted to manually resolve a merge, it can be
239 If a rebase is interrupted to manually resolve a merge, it can be
240 continued with --continue/-c or aborted with --abort/-a.
240 continued with --continue/-c or aborted with --abort/-a.
241
241
242 options:
242 options:
243
243
244 -s --source rebase from the specified changeset
244 -s --source rebase from the specified changeset
245 -b --base rebase from the base of the specified changeset (up to
245 -b --base rebase from the base of the specified changeset (up to
246 greatest common ancestor of base and dest)
246 greatest common ancestor of base and dest)
247 -d --dest rebase onto the specified changeset
247 -d --dest rebase onto the specified changeset
248 --collapse collapse the rebased changesets
248 --collapse collapse the rebased changesets
249 --keep keep original changesets
249 --keep keep original changesets
250 --keepbranches keep original branch names
250 --keepbranches keep original branch names
251 --detach force detaching of source from its original branch
251 --detach force detaching of source from its original branch
252 -c --continue continue an interrupted rebase
252 -c --continue continue an interrupted rebase
253 -a --abort abort an interrupted rebase
253 -a --abort abort an interrupted rebase
254 --style display using template map file
254 --style display using template map file
255 --template display with template
255 --template display with template
256
256
257 use "hg -v help rebase" to show global options
257 use "hg -v help rebase" to show global options
258
258
259 % Rebase with no arguments - from current
259 % Rebase with no arguments - from current
260 nothing to rebase
260 nothing to rebase
261
261
262 % Rebase with no arguments - from the current branch
262 % Rebase with no arguments - from the current branch
263 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
263 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
264 nothing to rebase
264 nothing to rebase
265 % ----------
265 % ----------
266 % These work
266 % These work
267
267
268 % Rebase with no arguments (from 3 onto 7)
268 % Rebase with no arguments (from 3 onto 7)
269 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
269 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
270 saved backup bundle to
270 saved backup bundle to
271 adding branch
272 adding changesets
273 adding manifests
274 adding file changes
275 added 5 changesets with 5 changes to 5 files
276 rebase completed
271 rebase completed
277 % Try to rollback after a rebase (fail)
272 % Try to rollback after a rebase (fail)
278 no rollback information available
273 no rollback information available
279
274
280 % Rebase with base == '.' => same as no arguments (from 3 onto 7)
275 % Rebase with base == '.' => same as no arguments (from 3 onto 7)
281 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
276 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
282 saved backup bundle to
277 saved backup bundle to
283 adding branch
284 adding changesets
285 adding manifests
286 adding file changes
287 added 5 changesets with 5 changes to 5 files
288 rebase completed
278 rebase completed
289
279
290 % Rebase with dest == default => same as no arguments (from 3 onto 7)
280 % Rebase with dest == default => same as no arguments (from 3 onto 7)
291 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
281 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
292 saved backup bundle to
282 saved backup bundle to
293 adding branch
294 adding changesets
295 adding manifests
296 adding file changes
297 added 5 changesets with 5 changes to 5 files
298 rebase completed
283 rebase completed
299
284
300 % Specify only source (from 4 onto 7)
285 % Specify only source (from 4 onto 7)
301 saved backup bundle to
286 saved backup bundle to
302 adding branch
303 adding changesets
304 adding manifests
305 adding file changes
306 added 4 changesets with 4 changes to 4 files (-1 heads)
307 rebase completed
287 rebase completed
308
288
309 % Specify only dest (from 3 onto 6)
289 % Specify only dest (from 3 onto 6)
310 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
290 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
311 saved backup bundle to
291 saved backup bundle to
312 adding branch
313 adding changesets
314 adding manifests
315 adding file changes
316 added 5 changesets with 5 changes to 5 files (+1 heads)
317 rebase completed
292 rebase completed
318
293
319 % Specify only base (from 3 onto 7)
294 % Specify only base (from 3 onto 7)
320 saved backup bundle to
295 saved backup bundle to
321 adding branch
322 adding changesets
323 adding manifests
324 adding file changes
325 added 5 changesets with 5 changes to 5 files
326 rebase completed
296 rebase completed
327
297
328 % Specify source and dest (from 4 onto 6)
298 % Specify source and dest (from 4 onto 6)
329 saved backup bundle to
299 saved backup bundle to
330 adding branch
331 adding changesets
332 adding manifests
333 adding file changes
334 added 4 changesets with 4 changes to 4 files
335 rebase completed
300 rebase completed
336
301
337 % Specify base and dest (from 3 onto 6)
302 % Specify base and dest (from 3 onto 6)
338 saved backup bundle to
303 saved backup bundle to
339 adding branch
340 adding changesets
341 adding manifests
342 adding file changes
343 added 5 changesets with 5 changes to 5 files (+1 heads)
344 rebase completed
304 rebase completed
@@ -1,57 +1,52 b''
1 updating to branch default
1 updating to branch default
2 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 updating to branch default
3 updating to branch default
4 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
5
5
6 % Now b has one revision to be pulled from a
6 % Now b has one revision to be pulled from a
7 pulling from
7 pulling from
8 searching for changes
8 searching for changes
9 adding changesets
9 adding changesets
10 adding manifests
10 adding manifests
11 adding file changes
11 adding file changes
12 added 1 changesets with 1 changes to 1 files (+1 heads)
12 added 1 changesets with 1 changes to 1 files (+1 heads)
13 saved backup bundle to
13 saved backup bundle to
14 adding branch
15 adding changesets
16 adding manifests
17 adding file changes
18 added 2 changesets with 2 changes to 2 files
19 rebase completed
14 rebase completed
20 @ 3:L1
15 @ 3:L1
21 |
16 |
22 o 2:R1
17 o 2:R1
23 |
18 |
24 o 1:C2
19 o 1:C2
25 |
20 |
26 o 0:C1
21 o 0:C1
27
22
28
23
29 % Re-run pull --rebase
24 % Re-run pull --rebase
30 pulling from
25 pulling from
31 searching for changes
26 searching for changes
32 no changes found
27 no changes found
33
28
34 % Invoke pull --rebase and nothing to rebase
29 % Invoke pull --rebase and nothing to rebase
35 pulling from
30 pulling from
36 searching for changes
31 searching for changes
37 adding changesets
32 adding changesets
38 adding manifests
33 adding manifests
39 adding file changes
34 adding file changes
40 added 1 changesets with 1 changes to 1 files
35 added 1 changesets with 1 changes to 1 files
41 nothing to rebase
36 nothing to rebase
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 @ 2
38 @ 2
44 |
39 |
45
40
46 % pull --rebase --update should ignore --update
41 % pull --rebase --update should ignore --update
47 pulling from
42 pulling from
48 searching for changes
43 searching for changes
49 no changes found
44 no changes found
50
45
51 % pull --rebase doesn't update if nothing has been pulled
46 % pull --rebase doesn't update if nothing has been pulled
52 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
53 pulling from
48 pulling from
54 searching for changes
49 searching for changes
55 no changes found
50 no changes found
56 o 2
51 o 2
57 |
52 |
@@ -1,144 +1,114 b''
1 @ 5: F
1 @ 5: F
2 |
2 |
3 | o 4: E
3 | o 4: E
4 |/|
4 |/|
5 o | 3: D
5 o | 3: D
6 | |
6 | |
7 | o 2: C
7 | o 2: C
8 |/
8 |/
9 | o 1: B
9 | o 1: B
10 |/
10 |/
11 o 0: A
11 o 0: A
12
12
13 % Rebasing
13 % Rebasing
14 % B onto F - simple rebase
14 % B onto F - simple rebase
15 saved backup bundle to
15 saved backup bundle to
16 adding branch
17 adding changesets
18 adding manifests
19 adding file changes
20 added 5 changesets with 4 changes to 4 files (+1 heads)
21 rebase completed
16 rebase completed
22 @ 5: B
17 @ 5: B
23 |
18 |
24 o 4: F
19 o 4: F
25 |
20 |
26 | o 3: E
21 | o 3: E
27 |/|
22 |/|
28 o | 2: D
23 o | 2: D
29 | |
24 | |
30 | o 1: C
25 | o 1: C
31 |/
26 |/
32 o 0: A
27 o 0: A
33
28
34 % B onto D - intermediate point
29 % B onto D - intermediate point
35 saved backup bundle to
30 saved backup bundle to
36 adding branch
37 adding changesets
38 adding manifests
39 adding file changes
40 added 5 changesets with 4 changes to 4 files (+2 heads)
41 rebase completed
31 rebase completed
42 @ 5: B
32 @ 5: B
43 |
33 |
44 | o 4: F
34 | o 4: F
45 |/
35 |/
46 | o 3: E
36 | o 3: E
47 |/|
37 |/|
48 o | 2: D
38 o | 2: D
49 | |
39 | |
50 | o 1: C
40 | o 1: C
51 |/
41 |/
52 o 0: A
42 o 0: A
53
43
54 % C onto F - skip of E
44 % C onto F - skip of E
55 saved backup bundle to
45 saved backup bundle to
56 adding branch
57 adding changesets
58 adding manifests
59 adding file changes
60 added 3 changesets with 3 changes to 3 files (+1 heads)
61 rebase completed
46 rebase completed
62 @ 4: C
47 @ 4: C
63 |
48 |
64 o 3: F
49 o 3: F
65 |
50 |
66 o 2: D
51 o 2: D
67 |
52 |
68 | o 1: B
53 | o 1: B
69 |/
54 |/
70 o 0: A
55 o 0: A
71
56
72 % D onto C - rebase of a branching point (skip E)
57 % D onto C - rebase of a branching point (skip E)
73 saved backup bundle to
58 saved backup bundle to
74 adding branch
75 adding changesets
76 adding manifests
77 adding file changes
78 added 2 changesets with 2 changes to 2 files
79 rebase completed
59 rebase completed
80 @ 4: F
60 @ 4: F
81 |
61 |
82 o 3: D
62 o 3: D
83 |
63 |
84 o 2: C
64 o 2: C
85 |
65 |
86 | o 1: B
66 | o 1: B
87 |/
67 |/
88 o 0: A
68 o 0: A
89
69
90 % E onto F - merged revision having a parent in ancestors of target
70 % E onto F - merged revision having a parent in ancestors of target
91 saved backup bundle to
71 saved backup bundle to
92 adding branch
93 adding changesets
94 adding manifests
95 adding file changes
96 added 2 changesets with 1 changes to 1 files (-1 heads)
97 rebase completed
72 rebase completed
98 @ 5: E
73 @ 5: E
99 |\
74 |\
100 | o 4: F
75 | o 4: F
101 | |
76 | |
102 | o 3: D
77 | o 3: D
103 | |
78 | |
104 o | 2: C
79 o | 2: C
105 |/
80 |/
106 | o 1: B
81 | o 1: B
107 |/
82 |/
108 o 0: A
83 o 0: A
109
84
110 % D onto B - E maintains C as parent
85 % D onto B - E maintains C as parent
111 saved backup bundle to
86 saved backup bundle to
112 adding branch
113 adding changesets
114 adding manifests
115 adding file changes
116 added 3 changesets with 2 changes to 2 files
117 rebase completed
87 rebase completed
118 @ 5: F
88 @ 5: F
119 |
89 |
120 | o 4: E
90 | o 4: E
121 |/|
91 |/|
122 o | 3: D
92 o | 3: D
123 | |
93 | |
124 | o 2: C
94 | o 2: C
125 | |
95 | |
126 o | 1: B
96 o | 1: B
127 |/
97 |/
128 o 0: A
98 o 0: A
129
99
130 % These will fail (using --source)
100 % These will fail (using --source)
131 % E onto D - rebase onto an ancestor
101 % E onto D - rebase onto an ancestor
132 abort: source is descendant of destination
102 abort: source is descendant of destination
133 % D onto E - rebase onto a descendant
103 % D onto E - rebase onto a descendant
134 abort: source is ancestor of destination
104 abort: source is ancestor of destination
135 % E onto B - merge revision with both parents not in ancestors of target
105 % E onto B - merge revision with both parents not in ancestors of target
136 abort: cannot use revision 4 as base, result would have 3 parents
106 abort: cannot use revision 4 as base, result would have 3 parents
137
107
138 % These will abort gracefully (using --base)
108 % These will abort gracefully (using --base)
139 % E onto E - rebase onto same changeset
109 % E onto E - rebase onto same changeset
140 nothing to rebase
110 nothing to rebase
141 % E onto D - rebase onto an ancestor
111 % E onto D - rebase onto an ancestor
142 nothing to rebase
112 nothing to rebase
143 % D onto E - rebase onto a descendant
113 % D onto E - rebase onto a descendant
144 nothing to rebase
114 nothing to rebase
@@ -1,114 +1,94 b''
1 crossed/.hg/store/00manifest.i
1 crossed/.hg/store/00manifest.i
2 rev offset length base linkrev nodeid p1 p2
2 rev offset length base linkrev nodeid p1 p2
3 0 0 112 0 0 6f105cbb914d 000000000000 000000000000
3 0 0 112 0 0 6f105cbb914d 000000000000 000000000000
4 1 112 56 1 3 1b55917b3699 000000000000 000000000000
4 1 112 56 1 3 1b55917b3699 000000000000 000000000000
5 2 168 123 1 1 8f3d04e263e5 000000000000 000000000000
5 2 168 123 1 1 8f3d04e263e5 000000000000 000000000000
6 3 291 122 1 2 f0ef8726ac4f 000000000000 000000000000
6 3 291 122 1 2 f0ef8726ac4f 000000000000 000000000000
7 4 413 87 4 4 0b76e38b4070 000000000000 000000000000
7 4 413 87 4 4 0b76e38b4070 000000000000 000000000000
8
8
9 crossed/.hg/store/data/012.i
9 crossed/.hg/store/data/012.i
10 rev offset length base linkrev nodeid p1 p2
10 rev offset length base linkrev nodeid p1 p2
11 0 0 3 0 0 b8e02f643373 000000000000 000000000000
11 0 0 3 0 0 b8e02f643373 000000000000 000000000000
12 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
12 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
13 2 6 3 2 2 2661d26c6496 000000000000 000000000000
13 2 6 3 2 2 2661d26c6496 000000000000 000000000000
14
14
15 crossed/.hg/store/data/021.i
15 crossed/.hg/store/data/021.i
16 rev offset length base linkrev nodeid p1 p2
16 rev offset length base linkrev nodeid p1 p2
17 0 0 3 0 0 b8e02f643373 000000000000 000000000000
17 0 0 3 0 0 b8e02f643373 000000000000 000000000000
18 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
18 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
19 2 6 3 2 1 2661d26c6496 000000000000 000000000000
19 2 6 3 2 1 2661d26c6496 000000000000 000000000000
20
20
21 crossed/.hg/store/data/102.i
21 crossed/.hg/store/data/102.i
22 rev offset length base linkrev nodeid p1 p2
22 rev offset length base linkrev nodeid p1 p2
23 0 0 3 0 1 b8e02f643373 000000000000 000000000000
23 0 0 3 0 1 b8e02f643373 000000000000 000000000000
24 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
24 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
25 2 6 3 2 2 2661d26c6496 000000000000 000000000000
25 2 6 3 2 2 2661d26c6496 000000000000 000000000000
26
26
27 crossed/.hg/store/data/120.i
27 crossed/.hg/store/data/120.i
28 rev offset length base linkrev nodeid p1 p2
28 rev offset length base linkrev nodeid p1 p2
29 0 0 3 0 1 b8e02f643373 000000000000 000000000000
29 0 0 3 0 1 b8e02f643373 000000000000 000000000000
30 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
30 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
31 2 6 3 2 0 2661d26c6496 000000000000 000000000000
31 2 6 3 2 0 2661d26c6496 000000000000 000000000000
32
32
33 crossed/.hg/store/data/201.i
33 crossed/.hg/store/data/201.i
34 rev offset length base linkrev nodeid p1 p2
34 rev offset length base linkrev nodeid p1 p2
35 0 0 3 0 2 b8e02f643373 000000000000 000000000000
35 0 0 3 0 2 b8e02f643373 000000000000 000000000000
36 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
36 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
37 2 6 3 2 1 2661d26c6496 000000000000 000000000000
37 2 6 3 2 1 2661d26c6496 000000000000 000000000000
38
38
39 crossed/.hg/store/data/210.i
39 crossed/.hg/store/data/210.i
40 rev offset length base linkrev nodeid p1 p2
40 rev offset length base linkrev nodeid p1 p2
41 0 0 3 0 2 b8e02f643373 000000000000 000000000000
41 0 0 3 0 2 b8e02f643373 000000000000 000000000000
42 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
42 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
43 2 6 3 2 0 2661d26c6496 000000000000 000000000000
43 2 6 3 2 0 2661d26c6496 000000000000 000000000000
44
44
45 crossed/.hg/store/data/manifest-file.i
45 crossed/.hg/store/data/manifest-file.i
46 rev offset length base linkrev nodeid p1 p2
46 rev offset length base linkrev nodeid p1 p2
47 0 0 3 0 3 b8e02f643373 000000000000 000000000000
47 0 0 3 0 3 b8e02f643373 000000000000 000000000000
48 1 3 3 1 4 5d9299349fc0 000000000000 000000000000
48 1 3 3 1 4 5d9299349fc0 000000000000 000000000000
49
49
50 % Trying to strip revision 0
50 % Trying to strip revision 0
51 saved backup bundle to
51 saved backup bundle to
52 adding branch
53 adding changesets
54 adding manifests
55 adding file changes
56 added 4 changesets with 15 changes to 7 files (+3 heads)
57 % Verifying
52 % Verifying
58 checking changesets
53 checking changesets
59 checking manifests
54 checking manifests
60 crosschecking files in changesets and manifests
55 crosschecking files in changesets and manifests
61 checking files
56 checking files
62 7 files, 4 changesets, 15 total revisions
57 7 files, 4 changesets, 15 total revisions
63
58
64 % Trying to strip revision 1
59 % Trying to strip revision 1
65 saved backup bundle to
60 saved backup bundle to
66 adding branch
67 adding changesets
68 adding manifests
69 adding file changes
70 added 3 changesets with 12 changes to 7 files (+3 heads)
71 % Verifying
61 % Verifying
72 checking changesets
62 checking changesets
73 checking manifests
63 checking manifests
74 crosschecking files in changesets and manifests
64 crosschecking files in changesets and manifests
75 checking files
65 checking files
76 7 files, 4 changesets, 14 total revisions
66 7 files, 4 changesets, 14 total revisions
77
67
78 % Trying to strip revision 2
68 % Trying to strip revision 2
79 saved backup bundle to
69 saved backup bundle to
80 adding branch
81 adding changesets
82 adding manifests
83 adding file changes
84 added 2 changesets with 8 changes to 6 files (+2 heads)
85 % Verifying
70 % Verifying
86 checking changesets
71 checking changesets
87 checking manifests
72 checking manifests
88 crosschecking files in changesets and manifests
73 crosschecking files in changesets and manifests
89 checking files
74 checking files
90 7 files, 4 changesets, 14 total revisions
75 7 files, 4 changesets, 14 total revisions
91
76
92 % Trying to strip revision 3
77 % Trying to strip revision 3
93 saved backup bundle to
78 saved backup bundle to
94 adding branch
95 adding changesets
96 adding manifests
97 adding file changes
98 added 1 changesets with 1 changes to 2 files (+1 heads)
99 % Verifying
79 % Verifying
100 checking changesets
80 checking changesets
101 checking manifests
81 checking manifests
102 crosschecking files in changesets and manifests
82 crosschecking files in changesets and manifests
103 checking files
83 checking files
104 7 files, 4 changesets, 19 total revisions
84 7 files, 4 changesets, 19 total revisions
105
85
106 % Trying to strip revision 4
86 % Trying to strip revision 4
107 saved backup bundle to
87 saved backup bundle to
108 % Verifying
88 % Verifying
109 checking changesets
89 checking changesets
110 checking manifests
90 checking manifests
111 crosschecking files in changesets and manifests
91 crosschecking files in changesets and manifests
112 checking files
92 checking files
113 7 files, 4 changesets, 19 total revisions
93 7 files, 4 changesets, 19 total revisions
114
94
General Comments 0
You need to be logged in to leave comments. Login now