Show More
@@ -1,253 +1,253 b'' | |||
|
1 | 1 | # mdiff.py - diff and patch routines for mercurial |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms |
|
6 | 6 | # of the GNU General Public License, incorporated herein by reference. |
|
7 | 7 | |
|
8 | 8 | import bdiff, mpatch, re, struct, util, md5 |
|
9 | 9 | |
|
10 | 10 | def splitnewlines(text): |
|
11 | 11 | '''like str.splitlines, but only split on newlines.''' |
|
12 | 12 | lines = [l + '\n' for l in text.split('\n')] |
|
13 | 13 | if lines: |
|
14 | 14 | if lines[-1] == '\n': |
|
15 | 15 | lines.pop() |
|
16 | 16 | else: |
|
17 | 17 | lines[-1] = lines[-1][:-1] |
|
18 | 18 | return lines |
|
19 | 19 | |
|
20 | 20 | class diffopts(object): |
|
21 | 21 | '''context is the number of context lines |
|
22 | 22 | text treats all files as text |
|
23 | 23 | showfunc enables diff -p output |
|
24 | 24 | git enables the git extended patch format |
|
25 | 25 | nodates removes dates from diff headers |
|
26 | 26 | ignorews ignores all whitespace changes in the diff |
|
27 | 27 | ignorewsamount ignores changes in the amount of whitespace |
|
28 | 28 | ignoreblanklines ignores changes whose lines are all blank''' |
|
29 | 29 | |
|
30 | 30 | defaults = { |
|
31 | 31 | 'context': 3, |
|
32 | 32 | 'text': False, |
|
33 |
'showfunc': |
|
|
33 | 'showfunc': False, | |
|
34 | 34 | 'git': False, |
|
35 | 35 | 'nodates': False, |
|
36 | 36 | 'ignorews': False, |
|
37 | 37 | 'ignorewsamount': False, |
|
38 | 38 | 'ignoreblanklines': False, |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | __slots__ = defaults.keys() |
|
42 | 42 | |
|
43 | 43 | def __init__(self, **opts): |
|
44 | 44 | for k in self.__slots__: |
|
45 | 45 | v = opts.get(k) |
|
46 | 46 | if v is None: |
|
47 | 47 | v = self.defaults[k] |
|
48 | 48 | setattr(self, k, v) |
|
49 | 49 | |
|
50 | 50 | defaultopts = diffopts() |
|
51 | 51 | |
|
52 | 52 | def wsclean(opts, text): |
|
53 | 53 | if opts.ignorews: |
|
54 | 54 | text = re.sub('[ \t]+', '', text) |
|
55 | 55 | elif opts.ignorewsamount: |
|
56 | 56 | text = re.sub('[ \t]+', ' ', text) |
|
57 | 57 | text = re.sub('[ \t]+\n', '\n', text) |
|
58 | 58 | if opts.ignoreblanklines: |
|
59 | 59 | text = re.sub('\n+', '', text) |
|
60 | 60 | return text |
|
61 | 61 | |
|
62 | 62 | def unidiff(a, ad, b, bd, fn1, fn2, r=None, opts=defaultopts): |
|
63 | 63 | def datetag(date, addtab=True): |
|
64 | 64 | if not opts.git and not opts.nodates: |
|
65 | 65 | return '\t%s\n' % date |
|
66 | 66 | if addtab and ' ' in fn1: |
|
67 | 67 | return '\t\n' |
|
68 | 68 | return '\n' |
|
69 | 69 | |
|
70 | 70 | if not a and not b: return "" |
|
71 | 71 | epoch = util.datestr((0, 0)) |
|
72 | 72 | |
|
73 | 73 | if not opts.text and (util.binary(a) or util.binary(b)): |
|
74 | 74 | def h(v): |
|
75 | 75 | # md5 is used instead of sha1 because md5 is supposedly faster |
|
76 | 76 | return md5.new(v).digest() |
|
77 | 77 | if a and b and len(a) == len(b) and h(a) == h(b): |
|
78 | 78 | return "" |
|
79 | 79 | l = ['Binary file %s has changed\n' % fn1] |
|
80 | 80 | elif not a: |
|
81 | 81 | b = splitnewlines(b) |
|
82 | 82 | if a is None: |
|
83 | 83 | l1 = '--- /dev/null%s' % datetag(epoch, False) |
|
84 | 84 | else: |
|
85 | 85 | l1 = "--- %s%s" % ("a/" + fn1, datetag(ad)) |
|
86 | 86 | l2 = "+++ %s%s" % ("b/" + fn2, datetag(bd)) |
|
87 | 87 | l3 = "@@ -0,0 +1,%d @@\n" % len(b) |
|
88 | 88 | l = [l1, l2, l3] + ["+" + e for e in b] |
|
89 | 89 | elif not b: |
|
90 | 90 | a = splitnewlines(a) |
|
91 | 91 | l1 = "--- %s%s" % ("a/" + fn1, datetag(ad)) |
|
92 | 92 | if b is None: |
|
93 | 93 | l2 = '+++ /dev/null%s' % datetag(epoch, False) |
|
94 | 94 | else: |
|
95 | 95 | l2 = "+++ %s%s" % ("b/" + fn2, datetag(bd)) |
|
96 | 96 | l3 = "@@ -1,%d +0,0 @@\n" % len(a) |
|
97 | 97 | l = [l1, l2, l3] + ["-" + e for e in a] |
|
98 | 98 | else: |
|
99 | 99 | al = splitnewlines(a) |
|
100 | 100 | bl = splitnewlines(b) |
|
101 | 101 | l = list(bunidiff(a, b, al, bl, "a/" + fn1, "b/" + fn2, opts=opts)) |
|
102 | 102 | if not l: return "" |
|
103 | 103 | # difflib uses a space, rather than a tab |
|
104 | 104 | l[0] = "%s%s" % (l[0][:-2], datetag(ad)) |
|
105 | 105 | l[1] = "%s%s" % (l[1][:-2], datetag(bd)) |
|
106 | 106 | |
|
107 | 107 | for ln in xrange(len(l)): |
|
108 | 108 | if l[ln][-1] != '\n': |
|
109 | 109 | l[ln] += "\n\ No newline at end of file\n" |
|
110 | 110 | |
|
111 | 111 | if r: |
|
112 | 112 | l.insert(0, "diff %s %s\n" % |
|
113 | 113 | (' '.join(["-r %s" % rev for rev in r]), fn1)) |
|
114 | 114 | |
|
115 | 115 | return "".join(l) |
|
116 | 116 | |
|
117 | 117 | # somewhat self contained replacement for difflib.unified_diff |
|
118 | 118 | # t1 and t2 are the text to be diffed |
|
119 | 119 | # l1 and l2 are the text broken up into lines |
|
120 | 120 | # header1 and header2 are the filenames for the diff output |
|
121 | 121 | def bunidiff(t1, t2, l1, l2, header1, header2, opts=defaultopts): |
|
122 | 122 | def contextend(l, len): |
|
123 | 123 | ret = l + opts.context |
|
124 | 124 | if ret > len: |
|
125 | 125 | ret = len |
|
126 | 126 | return ret |
|
127 | 127 | |
|
128 | 128 | def contextstart(l): |
|
129 | 129 | ret = l - opts.context |
|
130 | 130 | if ret < 0: |
|
131 | 131 | return 0 |
|
132 | 132 | return ret |
|
133 | 133 | |
|
134 | 134 | def yieldhunk(hunk, header): |
|
135 | 135 | if header: |
|
136 | 136 | for x in header: |
|
137 | 137 | yield x |
|
138 | 138 | (astart, a2, bstart, b2, delta) = hunk |
|
139 | 139 | aend = contextend(a2, len(l1)) |
|
140 | 140 | alen = aend - astart |
|
141 | 141 | blen = b2 - bstart + aend - a2 |
|
142 | 142 | |
|
143 | 143 | func = "" |
|
144 | 144 | if opts.showfunc: |
|
145 | 145 | # walk backwards from the start of the context |
|
146 | 146 | # to find a line starting with an alphanumeric char. |
|
147 | 147 | for x in xrange(astart, -1, -1): |
|
148 | 148 | t = l1[x].rstrip() |
|
149 | 149 | if funcre.match(t): |
|
150 | 150 | func = ' ' + t[:40] |
|
151 | 151 | break |
|
152 | 152 | |
|
153 | 153 | yield "@@ -%d,%d +%d,%d @@%s\n" % (astart + 1, alen, |
|
154 | 154 | bstart + 1, blen, func) |
|
155 | 155 | for x in delta: |
|
156 | 156 | yield x |
|
157 | 157 | for x in xrange(a2, aend): |
|
158 | 158 | yield ' ' + l1[x] |
|
159 | 159 | |
|
160 | 160 | header = [ "--- %s\t\n" % header1, "+++ %s\t\n" % header2 ] |
|
161 | 161 | |
|
162 | 162 | if opts.showfunc: |
|
163 | 163 | funcre = re.compile('\w') |
|
164 | 164 | |
|
165 | 165 | # bdiff.blocks gives us the matching sequences in the files. The loop |
|
166 | 166 | # below finds the spaces between those matching sequences and translates |
|
167 | 167 | # them into diff output. |
|
168 | 168 | # |
|
169 | 169 | diff = bdiff.blocks(t1, t2) |
|
170 | 170 | hunk = None |
|
171 | 171 | for i in xrange(len(diff)): |
|
172 | 172 | # The first match is special. |
|
173 | 173 | # we've either found a match starting at line 0 or a match later |
|
174 | 174 | # in the file. If it starts later, old and new below will both be |
|
175 | 175 | # empty and we'll continue to the next match. |
|
176 | 176 | if i > 0: |
|
177 | 177 | s = diff[i-1] |
|
178 | 178 | else: |
|
179 | 179 | s = [0, 0, 0, 0] |
|
180 | 180 | delta = [] |
|
181 | 181 | s1 = diff[i] |
|
182 | 182 | a1 = s[1] |
|
183 | 183 | a2 = s1[0] |
|
184 | 184 | b1 = s[3] |
|
185 | 185 | b2 = s1[2] |
|
186 | 186 | |
|
187 | 187 | old = l1[a1:a2] |
|
188 | 188 | new = l2[b1:b2] |
|
189 | 189 | |
|
190 | 190 | # bdiff sometimes gives huge matches past eof, this check eats them, |
|
191 | 191 | # and deals with the special first match case described above |
|
192 | 192 | if not old and not new: |
|
193 | 193 | continue |
|
194 | 194 | |
|
195 | 195 | if opts.ignorews or opts.ignorewsamount or opts.ignoreblanklines: |
|
196 | 196 | if wsclean(opts, "".join(old)) == wsclean(opts, "".join(new)): |
|
197 | 197 | continue |
|
198 | 198 | |
|
199 | 199 | astart = contextstart(a1) |
|
200 | 200 | bstart = contextstart(b1) |
|
201 | 201 | prev = None |
|
202 | 202 | if hunk: |
|
203 | 203 | # join with the previous hunk if it falls inside the context |
|
204 | 204 | if astart < hunk[1] + opts.context + 1: |
|
205 | 205 | prev = hunk |
|
206 | 206 | astart = hunk[1] |
|
207 | 207 | bstart = hunk[3] |
|
208 | 208 | else: |
|
209 | 209 | for x in yieldhunk(hunk, header): |
|
210 | 210 | yield x |
|
211 | 211 | # we only want to yield the header if the files differ, and |
|
212 | 212 | # we only want to yield it once. |
|
213 | 213 | header = None |
|
214 | 214 | if prev: |
|
215 | 215 | # we've joined the previous hunk, record the new ending points. |
|
216 | 216 | hunk[1] = a2 |
|
217 | 217 | hunk[3] = b2 |
|
218 | 218 | delta = hunk[4] |
|
219 | 219 | else: |
|
220 | 220 | # create a new hunk |
|
221 | 221 | hunk = [ astart, a2, bstart, b2, delta ] |
|
222 | 222 | |
|
223 | 223 | delta[len(delta):] = [ ' ' + x for x in l1[astart:a1] ] |
|
224 | 224 | delta[len(delta):] = [ '-' + x for x in old ] |
|
225 | 225 | delta[len(delta):] = [ '+' + x for x in new ] |
|
226 | 226 | |
|
227 | 227 | if hunk: |
|
228 | 228 | for x in yieldhunk(hunk, header): |
|
229 | 229 | yield x |
|
230 | 230 | |
|
231 | 231 | def patchtext(bin): |
|
232 | 232 | pos = 0 |
|
233 | 233 | t = [] |
|
234 | 234 | while pos < len(bin): |
|
235 | 235 | p1, p2, l = struct.unpack(">lll", bin[pos:pos + 12]) |
|
236 | 236 | pos += 12 |
|
237 | 237 | t.append(bin[pos:pos + l]) |
|
238 | 238 | pos += l |
|
239 | 239 | return "".join(t) |
|
240 | 240 | |
|
241 | 241 | def patch(a, bin): |
|
242 | 242 | return mpatch.patches(a, [bin]) |
|
243 | 243 | |
|
244 | 244 | # similar to difflib.SequenceMatcher.get_matching_blocks |
|
245 | 245 | def get_matching_blocks(a, b): |
|
246 | 246 | return [(d[0], d[2], d[1] - d[0]) for d in bdiff.blocks(a, b)] |
|
247 | 247 | |
|
248 | 248 | def trivialdiffheader(length): |
|
249 | 249 | return struct.pack(">lll", 0, 0, length) |
|
250 | 250 | |
|
251 | 251 | patches = mpatch.patches |
|
252 | 252 | patchedsize = mpatch.patchedsize |
|
253 | 253 | textdiff = bdiff.bdiff |
@@ -1,33 +1,33 b'' | |||
|
1 | 1 | found: No such file or directory |
|
2 | 2 | not: No such file or directory |
|
3 | 3 | quiet: |
|
4 | 4 | --- a/foo Mon Jan 12 13:46:40 1970 +0000 |
|
5 | 5 | +++ b/foo Mon Jan 12 13:46:41 1970 +0000 |
|
6 |
@@ -1,1 +1,1 @@ |
|
|
6 | @@ -1,1 +1,1 @@ | |
|
7 | 7 | -bar |
|
8 | 8 | +foobar |
|
9 | 9 | |
|
10 | 10 | normal: |
|
11 | 11 | diff -r 74de3f1392e2 -r b8b5f023a6ad foo |
|
12 | 12 | --- a/foo Mon Jan 12 13:46:40 1970 +0000 |
|
13 | 13 | +++ b/foo Mon Jan 12 13:46:41 1970 +0000 |
|
14 |
@@ -1,1 +1,1 @@ |
|
|
14 | @@ -1,1 +1,1 @@ | |
|
15 | 15 | -bar |
|
16 | 16 | +foobar |
|
17 | 17 | |
|
18 | 18 | verbose: |
|
19 | 19 | diff -r 74de3f1392e2 -r b8b5f023a6ad foo |
|
20 | 20 | --- a/foo Mon Jan 12 13:46:40 1970 +0000 |
|
21 | 21 | +++ b/foo Mon Jan 12 13:46:41 1970 +0000 |
|
22 |
@@ -1,1 +1,1 @@ |
|
|
22 | @@ -1,1 +1,1 @@ | |
|
23 | 23 | -bar |
|
24 | 24 | +foobar |
|
25 | 25 | |
|
26 | 26 | debug: |
|
27 | 27 | diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo |
|
28 | 28 | --- a/foo Mon Jan 12 13:46:40 1970 +0000 |
|
29 | 29 | +++ b/foo Mon Jan 12 13:46:41 1970 +0000 |
|
30 |
@@ -1,1 +1,1 @@ |
|
|
30 | @@ -1,1 +1,1 @@ | |
|
31 | 31 | -bar |
|
32 | 32 | +foobar |
|
33 | 33 |
@@ -1,289 +1,289 b'' | |||
|
1 | 1 | adding foo |
|
2 | 2 | >>> two diffs showing three added lines <<< |
|
3 | 3 | hg diff |
|
4 | 4 | diff -r 540c40a65b78 foo |
|
5 | 5 | --- a/foo |
|
6 | 6 | +++ b/foo |
|
7 |
@@ -1,2 +1,5 @@ |
|
|
7 | @@ -1,2 +1,5 @@ | |
|
8 | 8 | + |
|
9 | 9 | hello world |
|
10 | 10 | + |
|
11 | 11 | goodbye world |
|
12 | 12 | + |
|
13 | 13 | hg diff -b |
|
14 | 14 | diff -r 540c40a65b78 foo |
|
15 | 15 | --- a/foo |
|
16 | 16 | +++ b/foo |
|
17 |
@@ -1,2 +1,5 @@ |
|
|
17 | @@ -1,2 +1,5 @@ | |
|
18 | 18 | + |
|
19 | 19 | hello world |
|
20 | 20 | + |
|
21 | 21 | goodbye world |
|
22 | 22 | + |
|
23 | 23 | >>> no diffs <<< |
|
24 | 24 | hg diff -B |
|
25 | 25 | hg diff -Bb |
|
26 | 26 | >>> four diffs showing added space first on the first line <<< |
|
27 | 27 | hg diff |
|
28 | 28 | diff -r 540c40a65b78 foo |
|
29 | 29 | --- a/foo |
|
30 | 30 | +++ b/foo |
|
31 |
@@ -1,2 +1,2 @@ |
|
|
31 | @@ -1,2 +1,2 @@ | |
|
32 | 32 | -hello world |
|
33 | 33 | + hello world |
|
34 | 34 | goodbye world |
|
35 | 35 | hg diff -b |
|
36 | 36 | diff -r 540c40a65b78 foo |
|
37 | 37 | --- a/foo |
|
38 | 38 | +++ b/foo |
|
39 |
@@ -1,2 +1,2 @@ |
|
|
39 | @@ -1,2 +1,2 @@ | |
|
40 | 40 | -hello world |
|
41 | 41 | + hello world |
|
42 | 42 | goodbye world |
|
43 | 43 | hg diff -B |
|
44 | 44 | diff -r 540c40a65b78 foo |
|
45 | 45 | --- a/foo |
|
46 | 46 | +++ b/foo |
|
47 |
@@ -1,2 +1,2 @@ |
|
|
47 | @@ -1,2 +1,2 @@ | |
|
48 | 48 | -hello world |
|
49 | 49 | + hello world |
|
50 | 50 | goodbye world |
|
51 | 51 | hg diff -Bb |
|
52 | 52 | diff -r 540c40a65b78 foo |
|
53 | 53 | --- a/foo |
|
54 | 54 | +++ b/foo |
|
55 |
@@ -1,2 +1,2 @@ |
|
|
55 | @@ -1,2 +1,2 @@ | |
|
56 | 56 | -hello world |
|
57 | 57 | + hello world |
|
58 | 58 | goodbye world |
|
59 | 59 | >>> two diffs showing space appended to the first line <<< |
|
60 | 60 | hg diff |
|
61 | 61 | diff -r 540c40a65b78 foo |
|
62 | 62 | --- a/foo |
|
63 | 63 | +++ b/foo |
|
64 |
@@ -1,2 +1,2 @@ |
|
|
64 | @@ -1,2 +1,2 @@ | |
|
65 | 65 | -hello world |
|
66 | 66 | +hello world |
|
67 | 67 | goodbye world |
|
68 | 68 | hg diff -B |
|
69 | 69 | diff -r 540c40a65b78 foo |
|
70 | 70 | --- a/foo |
|
71 | 71 | +++ b/foo |
|
72 |
@@ -1,2 +1,2 @@ |
|
|
72 | @@ -1,2 +1,2 @@ | |
|
73 | 73 | -hello world |
|
74 | 74 | +hello world |
|
75 | 75 | goodbye world |
|
76 | 76 | >>> no diffs <<< |
|
77 | 77 | hg diff -b |
|
78 | 78 | hg diff -Bb |
|
79 | 79 | >>> four diffs showing space inserted into "goodbye" <<< |
|
80 | 80 | hg diff |
|
81 | 81 | diff -r 540c40a65b78 foo |
|
82 | 82 | --- a/foo |
|
83 | 83 | +++ b/foo |
|
84 |
@@ -1,2 +1,2 @@ |
|
|
84 | @@ -1,2 +1,2 @@ | |
|
85 | 85 | hello world |
|
86 | 86 | -goodbye world |
|
87 | 87 | +good bye world |
|
88 | 88 | hg diff -B |
|
89 | 89 | diff -r 540c40a65b78 foo |
|
90 | 90 | --- a/foo |
|
91 | 91 | +++ b/foo |
|
92 |
@@ -1,2 +1,2 @@ |
|
|
92 | @@ -1,2 +1,2 @@ | |
|
93 | 93 | hello world |
|
94 | 94 | -goodbye world |
|
95 | 95 | +good bye world |
|
96 | 96 | hg diff -b |
|
97 | 97 | diff -r 540c40a65b78 foo |
|
98 | 98 | --- a/foo |
|
99 | 99 | +++ b/foo |
|
100 |
@@ -1,2 +1,2 @@ |
|
|
100 | @@ -1,2 +1,2 @@ | |
|
101 | 101 | hello world |
|
102 | 102 | -goodbye world |
|
103 | 103 | +good bye world |
|
104 | 104 | hg diff -Bb |
|
105 | 105 | diff -r 540c40a65b78 foo |
|
106 | 106 | --- a/foo |
|
107 | 107 | +++ b/foo |
|
108 |
@@ -1,2 +1,2 @@ |
|
|
108 | @@ -1,2 +1,2 @@ | |
|
109 | 109 | hello world |
|
110 | 110 | -goodbye world |
|
111 | 111 | +good bye world |
|
112 | 112 | >>> two diffs showing changed whitespace amount in the last line <<< |
|
113 | 113 | hg diff |
|
114 | 114 | diff -r 540c40a65b78 foo |
|
115 | 115 | --- a/foo |
|
116 | 116 | +++ b/foo |
|
117 |
@@ -1,2 +1,2 @@ |
|
|
117 | @@ -1,2 +1,2 @@ | |
|
118 | 118 | hello world |
|
119 | 119 | -goodbye world |
|
120 | 120 | +goodbye world |
|
121 | 121 | hg diff -B |
|
122 | 122 | diff -r 540c40a65b78 foo |
|
123 | 123 | --- a/foo |
|
124 | 124 | +++ b/foo |
|
125 |
@@ -1,2 +1,2 @@ |
|
|
125 | @@ -1,2 +1,2 @@ | |
|
126 | 126 | hello world |
|
127 | 127 | -goodbye world |
|
128 | 128 | +goodbye world |
|
129 | 129 | >>> no diffs <<< |
|
130 | 130 | hg diff -b |
|
131 | 131 | hg diff -Bb |
|
132 | 132 | >>> four diffs showing added blank line w/horizontal space <<< |
|
133 | 133 | hg diff |
|
134 | 134 | diff -r 540c40a65b78 foo |
|
135 | 135 | --- a/foo |
|
136 | 136 | +++ b/foo |
|
137 |
@@ -1,2 +1,3 @@ |
|
|
137 | @@ -1,2 +1,3 @@ | |
|
138 | 138 | hello world |
|
139 | 139 | + |
|
140 | 140 | goodbye world |
|
141 | 141 | hg diff -B |
|
142 | 142 | diff -r 540c40a65b78 foo |
|
143 | 143 | --- a/foo |
|
144 | 144 | +++ b/foo |
|
145 |
@@ -1,2 +1,3 @@ |
|
|
145 | @@ -1,2 +1,3 @@ | |
|
146 | 146 | hello world |
|
147 | 147 | + |
|
148 | 148 | goodbye world |
|
149 | 149 | hg diff -b |
|
150 | 150 | diff -r 540c40a65b78 foo |
|
151 | 151 | --- a/foo |
|
152 | 152 | +++ b/foo |
|
153 |
@@ -1,2 +1,3 @@ |
|
|
153 | @@ -1,2 +1,3 @@ | |
|
154 | 154 | hello world |
|
155 | 155 | + |
|
156 | 156 | goodbye world |
|
157 | 157 | hg diff -Bb |
|
158 | 158 | >>> three diffs showing added blank line w/other space <<< |
|
159 | 159 | hg diff |
|
160 | 160 | diff -r 540c40a65b78 foo |
|
161 | 161 | --- a/foo |
|
162 | 162 | +++ b/foo |
|
163 |
@@ -1,2 +1,3 @@ |
|
|
163 | @@ -1,2 +1,3 @@ | |
|
164 | 164 | -hello world |
|
165 | 165 | -goodbye world |
|
166 | 166 | +hello world |
|
167 | 167 | + |
|
168 | 168 | +goodbye world |
|
169 | 169 | hg diff -B |
|
170 | 170 | diff -r 540c40a65b78 foo |
|
171 | 171 | --- a/foo |
|
172 | 172 | +++ b/foo |
|
173 |
@@ -1,2 +1,3 @@ |
|
|
173 | @@ -1,2 +1,3 @@ | |
|
174 | 174 | -hello world |
|
175 | 175 | -goodbye world |
|
176 | 176 | +hello world |
|
177 | 177 | + |
|
178 | 178 | +goodbye world |
|
179 | 179 | hg diff -b |
|
180 | 180 | diff -r 540c40a65b78 foo |
|
181 | 181 | --- a/foo |
|
182 | 182 | +++ b/foo |
|
183 |
@@ -1,2 +1,3 @@ |
|
|
183 | @@ -1,2 +1,3 @@ | |
|
184 | 184 | -hello world |
|
185 | 185 | -goodbye world |
|
186 | 186 | +hello world |
|
187 | 187 | + |
|
188 | 188 | +goodbye world |
|
189 | 189 | hg diff -Bb |
|
190 | 190 | >>> four diffs showing changed whitespace <<< |
|
191 | 191 | hg diff |
|
192 | 192 | diff -r 540c40a65b78 foo |
|
193 | 193 | --- a/foo |
|
194 | 194 | +++ b/foo |
|
195 |
@@ -1,2 +1,2 @@ |
|
|
195 | @@ -1,2 +1,2 @@ | |
|
196 | 196 | -hello world |
|
197 | 197 | -goodbye world |
|
198 | 198 | +helloworld |
|
199 | 199 | +goodbye world |
|
200 | 200 | hg diff -B |
|
201 | 201 | diff -r 540c40a65b78 foo |
|
202 | 202 | --- a/foo |
|
203 | 203 | +++ b/foo |
|
204 |
@@ -1,2 +1,2 @@ |
|
|
204 | @@ -1,2 +1,2 @@ | |
|
205 | 205 | -hello world |
|
206 | 206 | -goodbye world |
|
207 | 207 | +helloworld |
|
208 | 208 | +goodbye world |
|
209 | 209 | hg diff -b |
|
210 | 210 | diff -r 540c40a65b78 foo |
|
211 | 211 | --- a/foo |
|
212 | 212 | +++ b/foo |
|
213 |
@@ -1,2 +1,2 @@ |
|
|
213 | @@ -1,2 +1,2 @@ | |
|
214 | 214 | -hello world |
|
215 | 215 | -goodbye world |
|
216 | 216 | +helloworld |
|
217 | 217 | +goodbye world |
|
218 | 218 | hg diff -Bb |
|
219 | 219 | diff -r 540c40a65b78 foo |
|
220 | 220 | --- a/foo |
|
221 | 221 | +++ b/foo |
|
222 |
@@ -1,2 +1,2 @@ |
|
|
222 | @@ -1,2 +1,2 @@ | |
|
223 | 223 | -hello world |
|
224 | 224 | -goodbye world |
|
225 | 225 | +helloworld |
|
226 | 226 | +goodbye world |
|
227 | 227 | hg diff -w |
|
228 | 228 | >>> five diffs showing changed whitespace <<< |
|
229 | 229 | hg diff |
|
230 | 230 | diff -r 540c40a65b78 foo |
|
231 | 231 | --- a/foo |
|
232 | 232 | +++ b/foo |
|
233 |
@@ -1,2 +1,5 @@ |
|
|
233 | @@ -1,2 +1,5 @@ | |
|
234 | 234 | -hello world |
|
235 | 235 | -goodbye world |
|
236 | 236 | +helloworld |
|
237 | 237 | + |
|
238 | 238 | + |
|
239 | 239 | + |
|
240 | 240 | +goodbye world |
|
241 | 241 | hg diff -B |
|
242 | 242 | diff -r 540c40a65b78 foo |
|
243 | 243 | --- a/foo |
|
244 | 244 | +++ b/foo |
|
245 |
@@ -1,2 +1,5 @@ |
|
|
245 | @@ -1,2 +1,5 @@ | |
|
246 | 246 | -hello world |
|
247 | 247 | -goodbye world |
|
248 | 248 | +helloworld |
|
249 | 249 | + |
|
250 | 250 | + |
|
251 | 251 | + |
|
252 | 252 | +goodbye world |
|
253 | 253 | hg diff -b |
|
254 | 254 | diff -r 540c40a65b78 foo |
|
255 | 255 | --- a/foo |
|
256 | 256 | +++ b/foo |
|
257 |
@@ -1,2 +1,5 @@ |
|
|
257 | @@ -1,2 +1,5 @@ | |
|
258 | 258 | -hello world |
|
259 | 259 | -goodbye world |
|
260 | 260 | +helloworld |
|
261 | 261 | + |
|
262 | 262 | + |
|
263 | 263 | + |
|
264 | 264 | +goodbye world |
|
265 | 265 | hg diff -Bb |
|
266 | 266 | diff -r 540c40a65b78 foo |
|
267 | 267 | --- a/foo |
|
268 | 268 | +++ b/foo |
|
269 |
@@ -1,2 +1,5 @@ |
|
|
269 | @@ -1,2 +1,5 @@ | |
|
270 | 270 | -hello world |
|
271 | 271 | -goodbye world |
|
272 | 272 | +helloworld |
|
273 | 273 | + |
|
274 | 274 | + |
|
275 | 275 | + |
|
276 | 276 | +goodbye world |
|
277 | 277 | hg diff -w |
|
278 | 278 | diff -r 540c40a65b78 foo |
|
279 | 279 | --- a/foo |
|
280 | 280 | +++ b/foo |
|
281 |
@@ -1,2 +1,5 @@ |
|
|
281 | @@ -1,2 +1,5 @@ | |
|
282 | 282 | -hello world |
|
283 | 283 | -goodbye world |
|
284 | 284 | +helloworld |
|
285 | 285 | + |
|
286 | 286 | + |
|
287 | 287 | + |
|
288 | 288 | +goodbye world |
|
289 | 289 | hg diff -wB |
@@ -1,8 +1,8 b'' | |||
|
1 | 1 | adding a |
|
2 | 2 | diff -r 107ba6f817b5 -r 310ce7989cdc a |
|
3 | 3 | --- a/a Thu Jan 01 00:00:01 1970 +0000 |
|
4 | 4 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
|
5 | @@ -1,2 +1,3 @@ confuse str.splitlines | |
|
5 | @@ -1,2 +1,3 @@ | |
|
6 | 6 | confuse str.splitlines |
|
7 | 7 | embedded newline |
|
8 | 8 | +clean diff |
@@ -1,197 +1,197 b'' | |||
|
1 | 1 | adding start |
|
2 | 2 | adding new |
|
3 | 3 | % new file |
|
4 | 4 | diff --git a/new b/new |
|
5 | 5 | new file mode 100644 |
|
6 | 6 | --- /dev/null |
|
7 | 7 | +++ b/new |
|
8 | 8 | @@ -0,0 +1,1 @@ |
|
9 | 9 | +new |
|
10 | 10 | % copy |
|
11 | 11 | diff --git a/new b/copy |
|
12 | 12 | copy from new |
|
13 | 13 | copy to copy |
|
14 | 14 | % rename |
|
15 | 15 | diff --git a/copy b/rename |
|
16 | 16 | rename from copy |
|
17 | 17 | rename to rename |
|
18 | 18 | % delete |
|
19 | 19 | diff --git a/rename b/rename |
|
20 | 20 | deleted file mode 100644 |
|
21 | 21 | --- a/rename |
|
22 | 22 | +++ /dev/null |
|
23 | 23 | @@ -1,1 +0,0 @@ |
|
24 | 24 | -new |
|
25 | 25 | adding src |
|
26 | 26 | % chmod 644 |
|
27 | 27 | diff --git a/src b/src |
|
28 | 28 | old mode 100644 |
|
29 | 29 | new mode 100755 |
|
30 | 30 | % rename+mod+chmod |
|
31 | 31 | diff --git a/src b/dst |
|
32 | 32 | old mode 100755 |
|
33 | 33 | new mode 100644 |
|
34 | 34 | rename from src |
|
35 | 35 | rename to dst |
|
36 | 36 | --- a/src |
|
37 | 37 | +++ b/dst |
|
38 |
@@ -3,3 +3,4 @@ |
|
|
38 | @@ -3,3 +3,4 @@ | |
|
39 | 39 | 3 |
|
40 | 40 | 4 |
|
41 | 41 | 5 |
|
42 | 42 | +a |
|
43 | 43 | % nonexistent in tip+chmod |
|
44 | 44 | diff --git a/src b/src |
|
45 | 45 | old mode 100644 |
|
46 | 46 | new mode 100755 |
|
47 | 47 | % binary diff |
|
48 | 48 | diff --git a/binfile.bin b/binfile.bin |
|
49 | 49 | new file mode 100644 |
|
50 | 50 | index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 |
|
51 | 51 | GIT binary patch |
|
52 | 52 | literal 593 |
|
53 | 53 | zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU |
|
54 | 54 | z000XU0RWnu7ytkO2XskIMF-Uh9TW;VpMjwv0005-Nkl<ZD9@FWPs=e;7{<>W$NUkd |
|
55 | 55 | zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M |
|
56 | 56 | z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT |
|
57 | 57 | zLdY<T=ks|woh-`&01!ej#(xbV1f|pI*=%;d-%F*E*X#ZH`4I%6SS+$EJDE&ct=8po |
|
58 | 58 | ziN#{?_j|kD%Cd|oiqds`xm@;oJ-^?NG3Gdqrs?5u*zI;{nogxsx~^|Fn^Y?Gdc6<; |
|
59 | 59 | zfMJ+iF1J`LMx&A2?dEwNW8ClebzPTbIh{@$hS6*`kH@1d%Lo7fA#}N1)oN7`gm$~V |
|
60 | 60 | z+wDx#)OFqMcE{s!JN0-xhG8ItAjVkJwEcb`3WWlJfU2r?;Pd%dmR+q@mSri5q9_W- |
|
61 | 61 | zaR2~ECX?B2w+zELozC0s*6Z~|QG^f{3I#<`?)Q7U-JZ|q5W;9Q8i_=pBuSzunx=U; |
|
62 | 62 | z9C)5jBoYw9^?EHyQl(M}1OlQcCX>lXB*ODN003Z&P17_@)3Pi=i0wb04<W?v-u}7K |
|
63 | 63 | zXmmQA+wDgE!qR9o8jr`%=ab_&uh(l?R=r;Tjiqon91I2-hIu?57~@*4h7h9uORK#= |
|
64 | 64 | fQItJW-{SoTm)8|5##k|m00000NkvXXu0mjf{mKw4 |
|
65 | 65 | |
|
66 | 66 | % import binary diff |
|
67 | 67 | applying b.diff |
|
68 | 68 | |
|
69 | 69 | % rename binary file |
|
70 | 70 | diff --git a/binfile.bin b/renamed.bin |
|
71 | 71 | rename from binfile.bin |
|
72 | 72 | rename to renamed.bin |
|
73 | 73 | |
|
74 | 74 | % diff across many revisions |
|
75 | 75 | diff --git a/dst2 b/dst3 |
|
76 | 76 | rename from dst2 |
|
77 | 77 | rename to dst3 |
|
78 | 78 | % reversed |
|
79 | 79 | diff --git a/dst3 b/dst2 |
|
80 | 80 | rename from dst3 |
|
81 | 81 | rename to dst2 |
|
82 | 82 | |
|
83 | 83 | % file created before r1 and renamed before r2 |
|
84 | 84 | diff --git a/foo b/bar |
|
85 | 85 | rename from foo |
|
86 | 86 | rename to bar |
|
87 | 87 | --- a/foo |
|
88 | 88 | +++ b/bar |
|
89 |
@@ -1,2 +1,3 @@ |
|
|
89 | @@ -1,2 +1,3 @@ | |
|
90 | 90 | a |
|
91 | 91 | b |
|
92 | 92 | +c |
|
93 | 93 | % reversed |
|
94 | 94 | diff --git a/bar b/foo |
|
95 | 95 | rename from bar |
|
96 | 96 | rename to foo |
|
97 | 97 | --- a/bar |
|
98 | 98 | +++ b/foo |
|
99 |
@@ -1,3 +1,2 @@ |
|
|
99 | @@ -1,3 +1,2 @@ | |
|
100 | 100 | a |
|
101 | 101 | b |
|
102 | 102 | -c |
|
103 | 103 | |
|
104 | 104 | % file created in r1 and renamed before r2 |
|
105 | 105 | diff --git a/foo b/bar |
|
106 | 106 | rename from foo |
|
107 | 107 | rename to bar |
|
108 | 108 | --- a/foo |
|
109 | 109 | +++ b/bar |
|
110 |
@@ -1,1 +1,3 @@ |
|
|
110 | @@ -1,1 +1,3 @@ | |
|
111 | 111 | a |
|
112 | 112 | +b |
|
113 | 113 | +c |
|
114 | 114 | % reversed |
|
115 | 115 | diff --git a/bar b/foo |
|
116 | 116 | rename from bar |
|
117 | 117 | rename to foo |
|
118 | 118 | --- a/bar |
|
119 | 119 | +++ b/foo |
|
120 |
@@ -1,3 +1,1 @@ |
|
|
120 | @@ -1,3 +1,1 @@ | |
|
121 | 121 | a |
|
122 | 122 | -b |
|
123 | 123 | -c |
|
124 | 124 | |
|
125 | 125 | % file created after r1 and renamed before r2 |
|
126 | 126 | diff --git a/bar b/bar |
|
127 | 127 | new file mode 100644 |
|
128 | 128 | --- /dev/null |
|
129 | 129 | +++ b/bar |
|
130 | 130 | @@ -0,0 +1,3 @@ |
|
131 | 131 | +a |
|
132 | 132 | +b |
|
133 | 133 | +c |
|
134 | 134 | % reversed |
|
135 | 135 | diff --git a/bar b/bar |
|
136 | 136 | deleted file mode 100644 |
|
137 | 137 | --- a/bar |
|
138 | 138 | +++ /dev/null |
|
139 | 139 | @@ -1,3 +0,0 @@ |
|
140 | 140 | -a |
|
141 | 141 | -b |
|
142 | 142 | -c |
|
143 | 143 | |
|
144 | 144 | % comparing with the working dir |
|
145 | 145 | % there's a copy in the working dir... |
|
146 | 146 | diff --git a/created2 b/created3 |
|
147 | 147 | rename from created2 |
|
148 | 148 | rename to created3 |
|
149 | 149 | |
|
150 | 150 | % ...but there's another copy between the original rev and the wd |
|
151 | 151 | diff --git a/created b/created3 |
|
152 | 152 | rename from created |
|
153 | 153 | rename to created3 |
|
154 | 154 | |
|
155 | 155 | % ...but the source of the copy was created after the original rev |
|
156 | 156 | diff --git a/created3 b/created3 |
|
157 | 157 | new file mode 100644 |
|
158 | 158 | --- /dev/null |
|
159 | 159 | +++ b/created3 |
|
160 | 160 | @@ -0,0 +1,1 @@ |
|
161 | 161 | + |
|
162 | 162 | % created in parent of wd; renamed in the wd |
|
163 | 163 | diff --git a/brand-new b/brand-new2 |
|
164 | 164 | rename from brand-new |
|
165 | 165 | rename to brand-new2 |
|
166 | 166 | |
|
167 | 167 | % created between r1 and parent of wd; renamed in the wd |
|
168 | 168 | diff --git a/brand-new2 b/brand-new2 |
|
169 | 169 | new file mode 100644 |
|
170 | 170 | --- /dev/null |
|
171 | 171 | +++ b/brand-new2 |
|
172 | 172 | @@ -0,0 +1,1 @@ |
|
173 | 173 | + |
|
174 | 174 | % one file is copied to many destinations and removed |
|
175 | 175 | diff --git a/brand-new2 b/brand-new3 |
|
176 | 176 | rename from brand-new2 |
|
177 | 177 | rename to brand-new3 |
|
178 | 178 | diff --git a/brand-new2 b/brand-new3-2 |
|
179 | 179 | copy from brand-new2 |
|
180 | 180 | copy to brand-new3-2 |
|
181 | 181 | % reversed |
|
182 | 182 | diff --git a/brand-new3 b/brand-new2 |
|
183 | 183 | rename from brand-new3 |
|
184 | 184 | rename to brand-new2 |
|
185 | 185 | diff --git a/brand-new3-2 b/brand-new3-2 |
|
186 | 186 | deleted file mode 100644 |
|
187 | 187 | --- a/brand-new3-2 |
|
188 | 188 | +++ /dev/null |
|
189 | 189 | @@ -1,1 +0,0 @@ |
|
190 | 190 | - |
|
191 | 191 | % there should be a trailing TAB if there are spaces in the file name |
|
192 | 192 | diff --git a/with spaces b/with spaces |
|
193 | 193 | new file mode 100644 |
|
194 | 194 | --- /dev/null |
|
195 | 195 | +++ b/with spaces |
|
196 | 196 | @@ -0,0 +1,1 @@ |
|
197 | 197 | +foo |
@@ -1,37 +1,37 b'' | |||
|
1 | 1 | 1:f248da0d4c3e |
|
2 | 2 | 0:9eca13a34789 |
|
3 | 3 | f248da0d4c3e tip |
|
4 | 4 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
5 | 5 | 9eca13a34789 |
|
6 | 6 | 9eca13a34789+ |
|
7 | 7 | reverting file1 |
|
8 | 8 | 9eca13a34789 |
|
9 | 9 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 10 | f248da0d4c3e tip |
|
11 | 11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 12 | warning: conflicts during merge. |
|
13 | 13 | merging file1 |
|
14 | 14 | merging file1 failed! |
|
15 | 15 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
16 | 16 | There are unresolved merges with locally modified files. |
|
17 | 17 | You can redo the full merge using: |
|
18 | 18 | hg update 0 |
|
19 | 19 | hg update 1 |
|
20 | 20 | diff -r f248da0d4c3e file1 |
|
21 | 21 | --- a/file1 |
|
22 | 22 | +++ b/file1 |
|
23 |
@@ -1,3 +1,7 @@ |
|
|
23 | @@ -1,3 +1,7 @@ | |
|
24 | 24 | added file1 |
|
25 | 25 | another line of text |
|
26 | 26 | +<<<<<<< my |
|
27 | 27 | +changed file1 different |
|
28 | 28 | +======= |
|
29 | 29 | changed file1 |
|
30 | 30 | +>>>>>>> other |
|
31 | 31 | M file1 |
|
32 | 32 | f248da0d4c3e+ tip |
|
33 | 33 | reverting file1 |
|
34 | 34 | f248da0d4c3e tip |
|
35 | 35 | f248da0d4c3e tip |
|
36 | 36 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 37 | f248da0d4c3e tip |
@@ -1,55 +1,55 b'' | |||
|
1 | 1 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2 | 2 | %% no merges expected |
|
3 | 3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 4 | (branch merge, don't forget to commit) |
|
5 | 5 | diff -r d9e5953b9dec b |
|
6 | 6 | --- /dev/null |
|
7 | 7 | +++ b/b |
|
8 | 8 | @@ -0,0 +1,1 @@ |
|
9 | 9 | +This is file b1 |
|
10 | 10 | M b |
|
11 | 11 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
12 | 12 | %% merge should fail |
|
13 | 13 | abort: untracked file in working directory differs from file in requested revision: 'b' |
|
14 | 14 | %% merge of b expected |
|
15 | 15 | merging for b |
|
16 | 16 | merging b |
|
17 | 17 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
18 | 18 | (branch merge, don't forget to commit) |
|
19 | 19 | diff -r d9e5953b9dec b |
|
20 | 20 | --- /dev/null |
|
21 | 21 | +++ b/b |
|
22 | 22 | @@ -0,0 +1,1 @@ |
|
23 | 23 | +This is file b2 |
|
24 | 24 | M b |
|
25 | 25 | %% |
|
26 | 26 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 27 | Contents of b should be "this is file b1" |
|
28 | 28 | This is file b1 |
|
29 | 29 | %% merge fails |
|
30 | 30 | abort: outstanding uncommitted changes |
|
31 | 31 | %% merge expected! |
|
32 | 32 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 33 | (branch merge, don't forget to commit) |
|
34 | 34 | diff -r c1dd73cbf59f b |
|
35 | 35 | --- a/b |
|
36 | 36 | +++ b/b |
|
37 |
@@ -1,1 +1,1 @@ |
|
|
37 | @@ -1,1 +1,1 @@ | |
|
38 | 38 | -This is file b1 |
|
39 | 39 | +This is file b22 |
|
40 | 40 | M b |
|
41 | 41 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 42 | %% merge of b should fail |
|
43 | 43 | abort: outstanding uncommitted changes |
|
44 | 44 | %% merge of b expected |
|
45 | 45 | merging for b |
|
46 | 46 | merging b |
|
47 | 47 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
48 | 48 | (branch merge, don't forget to commit) |
|
49 | 49 | diff -r c1dd73cbf59f b |
|
50 | 50 | --- a/b |
|
51 | 51 | +++ b/b |
|
52 |
@@ -1,1 +1,1 @@ |
|
|
52 | @@ -1,1 +1,1 @@ | |
|
53 | 53 | -This is file b1 |
|
54 | 54 | +This is file b33 |
|
55 | 55 | M b |
@@ -1,19 +1,19 b'' | |||
|
1 | 1 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2 | 2 | pulling from ../a |
|
3 | 3 | searching for changes |
|
4 | 4 | adding changesets |
|
5 | 5 | adding manifests |
|
6 | 6 | adding file changes |
|
7 | 7 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
8 | 8 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
9 | 9 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 10 | merging testdir/subdir/a and testdir/a |
|
11 | 11 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
12 | 12 | (branch merge, don't forget to commit) |
|
13 | 13 | M testdir/subdir/a |
|
14 | 14 | diff -r d02b3fc32762 testdir/subdir/a |
|
15 | 15 | --- a/testdir/subdir/a |
|
16 | 16 | +++ b/testdir/subdir/a |
|
17 |
@@ -1,1 +1,1 @@ |
|
|
17 | @@ -1,1 +1,1 @@ | |
|
18 | 18 | -a |
|
19 | 19 | +alpha |
@@ -1,49 +1,49 b'' | |||
|
1 | 1 | adding b |
|
2 | 2 | Patch queue now empty |
|
3 | 3 | % push patch with missing target |
|
4 | 4 | applying changeb |
|
5 | 5 | unable to find 'b' for patching |
|
6 | 6 | 2 out of 2 hunks FAILED -- saving rejects to file b.rej |
|
7 | 7 | patch failed, unable to continue (try -v) |
|
8 | 8 | patch failed, rejects left in working dir |
|
9 | 9 | Errors during apply, please fix and refresh changeb |
|
10 | 10 | % display added files |
|
11 | 11 | a |
|
12 | 12 | c |
|
13 | 13 | % display rejections |
|
14 | 14 | --- b |
|
15 | 15 | +++ b |
|
16 |
@@ -1,3 +1,5 @@ |
|
|
16 | @@ -1,3 +1,5 @@ | |
|
17 | 17 | +b |
|
18 | 18 | +b |
|
19 | 19 | a |
|
20 | 20 | a |
|
21 | 21 | a |
|
22 |
@@ -8,3 +10,5 @@ |
|
|
22 | @@ -8,3 +10,5 @@ | |
|
23 | 23 | a |
|
24 | 24 | a |
|
25 | 25 | a |
|
26 | 26 | +c |
|
27 | 27 | +c |
|
28 | 28 | adding b |
|
29 | 29 | Patch queue now empty |
|
30 | 30 | % push git patch with missing target |
|
31 | 31 | applying changeb |
|
32 | 32 | unable to find 'b' for patching |
|
33 | 33 | 1 out of 1 hunk FAILED -- saving rejects to file b.rej |
|
34 | 34 | patch failed, unable to continue (try -v) |
|
35 | 35 | b: No such file or directory |
|
36 | 36 | b not tracked! |
|
37 | 37 | patch failed, rejects left in working dir |
|
38 | 38 | Errors during apply, please fix and refresh changeb |
|
39 | 39 | ? b.rej |
|
40 | 40 | % display added files |
|
41 | 41 | a |
|
42 | 42 | c |
|
43 | 43 | % display rejections |
|
44 | 44 | --- b |
|
45 | 45 | +++ b |
|
46 | 46 | GIT binary patch |
|
47 | 47 | literal 2 |
|
48 | 48 | Jc${No0000400IC2 |
|
49 | 49 |
@@ -1,19 +1,19 b'' | |||
|
1 | 1 | % init |
|
2 | 2 | % commit |
|
3 | 3 | adding base |
|
4 | 4 | % qnew mqbase |
|
5 | 5 | % qrefresh |
|
6 | 6 | % qdiff |
|
7 | 7 | diff -r 67e992f2c4f3 base |
|
8 | 8 | --- a/base |
|
9 | 9 | +++ b/base |
|
10 |
@@ -1,1 +1,1 @@ |
|
|
10 | @@ -1,1 +1,1 @@ | |
|
11 | 11 | -base |
|
12 | 12 | +patched |
|
13 | 13 | % qdiff dirname |
|
14 | 14 | diff -r 67e992f2c4f3 base |
|
15 | 15 | --- a/base |
|
16 | 16 | +++ b/base |
|
17 |
@@ -1,1 +1,1 @@ |
|
|
17 | @@ -1,1 +1,1 @@ | |
|
18 | 18 | -base |
|
19 | 19 | +patched |
@@ -1,161 +1,161 b'' | |||
|
1 | 1 | % init |
|
2 | 2 | % commit |
|
3 | 3 | adding 1/base |
|
4 | 4 | adding 2/base |
|
5 | 5 | % qnew mqbase |
|
6 | 6 | % qrefresh |
|
7 | 7 | % qdiff |
|
8 | 8 | diff -r b55ecdccb5cf 1/base |
|
9 | 9 | --- a/1/base |
|
10 | 10 | +++ b/1/base |
|
11 |
@@ -1,1 +1,1 @@ |
|
|
11 | @@ -1,1 +1,1 @@ | |
|
12 | 12 | -base |
|
13 | 13 | +patched |
|
14 | 14 | diff -r b55ecdccb5cf 2/base |
|
15 | 15 | --- a/2/base |
|
16 | 16 | +++ b/2/base |
|
17 |
@@ -1,1 +1,1 @@ |
|
|
17 | @@ -1,1 +1,1 @@ | |
|
18 | 18 | -base |
|
19 | 19 | +patched |
|
20 | 20 | % qdiff dirname |
|
21 | 21 | diff -r b55ecdccb5cf 1/base |
|
22 | 22 | --- a/1/base |
|
23 | 23 | +++ b/1/base |
|
24 |
@@ -1,1 +1,1 @@ |
|
|
24 | @@ -1,1 +1,1 @@ | |
|
25 | 25 | -base |
|
26 | 26 | +patched |
|
27 | 27 | diff -r b55ecdccb5cf 2/base |
|
28 | 28 | --- a/2/base |
|
29 | 29 | +++ b/2/base |
|
30 |
@@ -1,1 +1,1 @@ |
|
|
30 | @@ -1,1 +1,1 @@ | |
|
31 | 31 | -base |
|
32 | 32 | +patched |
|
33 | 33 | % patch file contents |
|
34 | 34 | mqbase |
|
35 | 35 | |
|
36 | 36 | diff -r b55ecdccb5cf 1/base |
|
37 | 37 | --- a/1/base |
|
38 | 38 | +++ b/1/base |
|
39 |
@@ -1,1 +1,1 @@ |
|
|
39 | @@ -1,1 +1,1 @@ | |
|
40 | 40 | -base |
|
41 | 41 | +patched |
|
42 | 42 | diff -r b55ecdccb5cf 2/base |
|
43 | 43 | --- a/2/base |
|
44 | 44 | +++ b/2/base |
|
45 |
@@ -1,1 +1,1 @@ |
|
|
45 | @@ -1,1 +1,1 @@ | |
|
46 | 46 | -base |
|
47 | 47 | +patched |
|
48 | 48 | % qrefresh 1 |
|
49 | 49 | % qdiff |
|
50 | 50 | diff -r b55ecdccb5cf 1/base |
|
51 | 51 | --- a/1/base |
|
52 | 52 | +++ b/1/base |
|
53 |
@@ -1,1 +1,1 @@ |
|
|
53 | @@ -1,1 +1,1 @@ | |
|
54 | 54 | -base |
|
55 | 55 | +patched |
|
56 | 56 | diff -r b55ecdccb5cf 2/base |
|
57 | 57 | --- a/2/base |
|
58 | 58 | +++ b/2/base |
|
59 |
@@ -1,1 +1,1 @@ |
|
|
59 | @@ -1,1 +1,1 @@ | |
|
60 | 60 | -base |
|
61 | 61 | +patched |
|
62 | 62 | % qdiff dirname |
|
63 | 63 | diff -r b55ecdccb5cf 1/base |
|
64 | 64 | --- a/1/base |
|
65 | 65 | +++ b/1/base |
|
66 |
@@ -1,1 +1,1 @@ |
|
|
66 | @@ -1,1 +1,1 @@ | |
|
67 | 67 | -base |
|
68 | 68 | +patched |
|
69 | 69 | diff -r b55ecdccb5cf 2/base |
|
70 | 70 | --- a/2/base |
|
71 | 71 | +++ b/2/base |
|
72 |
@@ -1,1 +1,1 @@ |
|
|
72 | @@ -1,1 +1,1 @@ | |
|
73 | 73 | -base |
|
74 | 74 | +patched |
|
75 | 75 | % patch file contents |
|
76 | 76 | mqbase |
|
77 | 77 | |
|
78 | 78 | diff -r b55ecdccb5cf 1/base |
|
79 | 79 | --- a/1/base |
|
80 | 80 | +++ b/1/base |
|
81 |
@@ -1,1 +1,1 @@ |
|
|
81 | @@ -1,1 +1,1 @@ | |
|
82 | 82 | -base |
|
83 | 83 | +patched |
|
84 | 84 | % qrefresh . in subdir |
|
85 | 85 | % qdiff |
|
86 | 86 | diff -r b55ecdccb5cf 1/base |
|
87 | 87 | --- a/1/base |
|
88 | 88 | +++ b/1/base |
|
89 |
@@ -1,1 +1,1 @@ |
|
|
89 | @@ -1,1 +1,1 @@ | |
|
90 | 90 | -base |
|
91 | 91 | +patched |
|
92 | 92 | diff -r b55ecdccb5cf 2/base |
|
93 | 93 | --- a/2/base |
|
94 | 94 | +++ b/2/base |
|
95 |
@@ -1,1 +1,1 @@ |
|
|
95 | @@ -1,1 +1,1 @@ | |
|
96 | 96 | -base |
|
97 | 97 | +patched |
|
98 | 98 | % qdiff dirname |
|
99 | 99 | diff -r b55ecdccb5cf 1/base |
|
100 | 100 | --- a/1/base |
|
101 | 101 | +++ b/1/base |
|
102 |
@@ -1,1 +1,1 @@ |
|
|
102 | @@ -1,1 +1,1 @@ | |
|
103 | 103 | -base |
|
104 | 104 | +patched |
|
105 | 105 | diff -r b55ecdccb5cf 2/base |
|
106 | 106 | --- a/2/base |
|
107 | 107 | +++ b/2/base |
|
108 |
@@ -1,1 +1,1 @@ |
|
|
108 | @@ -1,1 +1,1 @@ | |
|
109 | 109 | -base |
|
110 | 110 | +patched |
|
111 | 111 | % patch file contents |
|
112 | 112 | mqbase |
|
113 | 113 | |
|
114 | 114 | diff -r b55ecdccb5cf 1/base |
|
115 | 115 | --- a/1/base |
|
116 | 116 | +++ b/1/base |
|
117 |
@@ -1,1 +1,1 @@ |
|
|
117 | @@ -1,1 +1,1 @@ | |
|
118 | 118 | -base |
|
119 | 119 | +patched |
|
120 | 120 | % qrefresh in hg-root again |
|
121 | 121 | % qdiff |
|
122 | 122 | diff -r b55ecdccb5cf 1/base |
|
123 | 123 | --- a/1/base |
|
124 | 124 | +++ b/1/base |
|
125 |
@@ -1,1 +1,1 @@ |
|
|
125 | @@ -1,1 +1,1 @@ | |
|
126 | 126 | -base |
|
127 | 127 | +patched |
|
128 | 128 | diff -r b55ecdccb5cf 2/base |
|
129 | 129 | --- a/2/base |
|
130 | 130 | +++ b/2/base |
|
131 |
@@ -1,1 +1,1 @@ |
|
|
131 | @@ -1,1 +1,1 @@ | |
|
132 | 132 | -base |
|
133 | 133 | +patched |
|
134 | 134 | % qdiff dirname |
|
135 | 135 | diff -r b55ecdccb5cf 1/base |
|
136 | 136 | --- a/1/base |
|
137 | 137 | +++ b/1/base |
|
138 |
@@ -1,1 +1,1 @@ |
|
|
138 | @@ -1,1 +1,1 @@ | |
|
139 | 139 | -base |
|
140 | 140 | +patched |
|
141 | 141 | diff -r b55ecdccb5cf 2/base |
|
142 | 142 | --- a/2/base |
|
143 | 143 | +++ b/2/base |
|
144 |
@@ -1,1 +1,1 @@ |
|
|
144 | @@ -1,1 +1,1 @@ | |
|
145 | 145 | -base |
|
146 | 146 | +patched |
|
147 | 147 | % patch file contents |
|
148 | 148 | mqbase |
|
149 | 149 | |
|
150 | 150 | diff -r b55ecdccb5cf 1/base |
|
151 | 151 | --- a/1/base |
|
152 | 152 | +++ b/1/base |
|
153 |
@@ -1,1 +1,1 @@ |
|
|
153 | @@ -1,1 +1,1 @@ | |
|
154 | 154 | -base |
|
155 | 155 | +patched |
|
156 | 156 | diff -r b55ecdccb5cf 2/base |
|
157 | 157 | --- a/2/base |
|
158 | 158 | +++ b/2/base |
|
159 |
@@ -1,1 +1,1 @@ |
|
|
159 | @@ -1,1 +1,1 @@ | |
|
160 | 160 | -base |
|
161 | 161 | +patched |
@@ -1,458 +1,458 b'' | |||
|
1 | 1 | % help |
|
2 | 2 | mq extension - patch management and development |
|
3 | 3 | |
|
4 | 4 | This extension lets you work with a stack of patches in a Mercurial |
|
5 | 5 | repository. It manages two stacks of patches - all known patches, and |
|
6 | 6 | applied patches (subset of known patches). |
|
7 | 7 | |
|
8 | 8 | Known patches are represented as patch files in the .hg/patches |
|
9 | 9 | directory. Applied patches are both patch files and changesets. |
|
10 | 10 | |
|
11 | 11 | Common tasks (use "hg help command" for more details): |
|
12 | 12 | |
|
13 | 13 | prepare repository to work with patches qinit |
|
14 | 14 | create new patch qnew |
|
15 | 15 | import existing patch qimport |
|
16 | 16 | |
|
17 | 17 | print patch series qseries |
|
18 | 18 | print applied patches qapplied |
|
19 | 19 | print name of top applied patch qtop |
|
20 | 20 | |
|
21 | 21 | add known patch to applied stack qpush |
|
22 | 22 | remove patch from applied stack qpop |
|
23 | 23 | refresh contents of top applied patch qrefresh |
|
24 | 24 | |
|
25 | 25 | list of commands: |
|
26 | 26 | |
|
27 | 27 | qapplied print the patches already applied |
|
28 | 28 | qclone clone main and patch repository at same time |
|
29 | 29 | qcommit commit changes in the queue repository |
|
30 | 30 | qdelete remove patches from queue |
|
31 | 31 | qdiff diff of the current patch |
|
32 | 32 | qfold fold the named patches into the current patch |
|
33 | 33 | qgoto push or pop patches until named patch is at top of stack |
|
34 | 34 | qguard set or print guards for a patch |
|
35 | 35 | qheader Print the header of the topmost or specified patch |
|
36 | 36 | qimport import a patch |
|
37 | 37 | qinit init a new queue repository |
|
38 | 38 | qnew create a new patch |
|
39 | 39 | qnext print the name of the next patch |
|
40 | 40 | qpop pop the current patch off the stack |
|
41 | 41 | qprev print the name of the previous patch |
|
42 | 42 | qpush push the next patch onto the stack |
|
43 | 43 | qrefresh update the current patch |
|
44 | 44 | qrename rename a patch |
|
45 | 45 | qrestore restore the queue state saved by a rev |
|
46 | 46 | qsave save current queue state |
|
47 | 47 | qselect set or print guarded patches to push |
|
48 | 48 | qseries print the entire series file |
|
49 | 49 | qtop print the name of the current patch |
|
50 | 50 | qunapplied print the patches not yet applied |
|
51 | 51 | strip strip a revision and all later revs on the same branch |
|
52 | 52 | |
|
53 | 53 | use "hg -v help mq" to show aliases and global options |
|
54 | 54 | adding a |
|
55 | 55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
56 | 56 | adding b/z |
|
57 | 57 | % qinit |
|
58 | 58 | % -R qinit |
|
59 | 59 | % qinit -c |
|
60 | 60 | A .hgignore |
|
61 | 61 | A series |
|
62 | 62 | % qnew implies add |
|
63 | 63 | A .hgignore |
|
64 | 64 | A series |
|
65 | 65 | A test.patch |
|
66 | 66 | % qinit; qinit -c |
|
67 | 67 | .hgignore: |
|
68 | 68 | syntax: glob |
|
69 | 69 | status |
|
70 | 70 | guards |
|
71 | 71 | series: |
|
72 | 72 | abort: repository already exists! |
|
73 | 73 | % qinit; <stuff>; qinit -c |
|
74 | 74 | adding .hg/patches/A |
|
75 | 75 | adding .hg/patches/B |
|
76 | 76 | A .hgignore |
|
77 | 77 | A A |
|
78 | 78 | A B |
|
79 | 79 | A series |
|
80 | 80 | .hgignore: |
|
81 | 81 | status |
|
82 | 82 | bleh |
|
83 | 83 | series: |
|
84 | 84 | A |
|
85 | 85 | B |
|
86 | 86 | % qnew with uncommitted changes |
|
87 | 87 | abort: local changes found, refresh first |
|
88 | 88 | A somefile |
|
89 | 89 | % qnew with uncommitted changes and missing file (issue 803) |
|
90 | 90 | someotherfile: No such file or directory |
|
91 | 91 | A somefile |
|
92 | 92 | issue803.patch |
|
93 | 93 | Patch queue now empty |
|
94 | 94 | % qnew -m |
|
95 | 95 | foo bar |
|
96 | 96 | % qrefresh |
|
97 | 97 | foo bar |
|
98 | 98 | |
|
99 | 99 | diff -r xa |
|
100 | 100 | --- a/a |
|
101 | 101 | +++ b/a |
|
102 |
@@ -1,1 +1,2 @@ |
|
|
102 | @@ -1,1 +1,2 @@ | |
|
103 | 103 | a |
|
104 | 104 | +a |
|
105 | 105 | % empty qrefresh |
|
106 | 106 | revision: |
|
107 | 107 | patch: |
|
108 | 108 | foo bar |
|
109 | 109 | |
|
110 | 110 | working dir diff: |
|
111 | 111 | --- a/a |
|
112 | 112 | +++ b/a |
|
113 |
@@ -1,1 +1,2 @@ |
|
|
113 | @@ -1,1 +1,2 @@ | |
|
114 | 114 | a |
|
115 | 115 | +a |
|
116 | 116 | % qpop |
|
117 | 117 | Patch queue now empty |
|
118 | 118 | % qpush |
|
119 | 119 | applying test.patch |
|
120 | 120 | Now at: test.patch |
|
121 | 121 | % pop/push outside repo |
|
122 | 122 | Patch queue now empty |
|
123 | 123 | applying test.patch |
|
124 | 124 | Now at: test.patch |
|
125 | 125 | % qrefresh in subdir |
|
126 | 126 | % pop/push -a in subdir |
|
127 | 127 | Patch queue now empty |
|
128 | 128 | applying test.patch |
|
129 | 129 | applying test2.patch |
|
130 | 130 | Now at: test2.patch |
|
131 | 131 | % qseries |
|
132 | 132 | test.patch |
|
133 | 133 | test2.patch |
|
134 | 134 | Now at: test.patch |
|
135 | 135 | 0 A test.patch: foo bar |
|
136 | 136 | 1 U test2.patch: |
|
137 | 137 | applying test2.patch |
|
138 | 138 | Now at: test2.patch |
|
139 | 139 | % qapplied |
|
140 | 140 | test.patch |
|
141 | 141 | test2.patch |
|
142 | 142 | % qtop |
|
143 | 143 | test2.patch |
|
144 | 144 | % qprev |
|
145 | 145 | test.patch |
|
146 | 146 | % qnext |
|
147 | 147 | All patches applied |
|
148 | 148 | % pop, qnext, qprev, qapplied |
|
149 | 149 | Now at: test.patch |
|
150 | 150 | test2.patch |
|
151 | 151 | Only one patch applied |
|
152 | 152 | test.patch |
|
153 | 153 | % commit should fail |
|
154 | 154 | abort: cannot commit over an applied mq patch |
|
155 | 155 | % push should fail |
|
156 | 156 | pushing to ../../k |
|
157 | 157 | abort: source has mq patches applied |
|
158 | 158 | % qunapplied |
|
159 | 159 | test2.patch |
|
160 | 160 | % qpush/qpop with index |
|
161 | 161 | applying test2.patch |
|
162 | 162 | Now at: test2.patch |
|
163 | 163 | Now at: test.patch |
|
164 | 164 | applying test1b.patch |
|
165 | 165 | Now at: test1b.patch |
|
166 | 166 | applying test2.patch |
|
167 | 167 | Now at: test2.patch |
|
168 | 168 | Now at: test1b.patch |
|
169 | 169 | Now at: test.patch |
|
170 | 170 | applying test1b.patch |
|
171 | 171 | applying test2.patch |
|
172 | 172 | Now at: test2.patch |
|
173 | 173 | % push should succeed |
|
174 | 174 | Patch queue now empty |
|
175 | 175 | pushing to ../../k |
|
176 | 176 | searching for changes |
|
177 | 177 | adding changesets |
|
178 | 178 | adding manifests |
|
179 | 179 | adding file changes |
|
180 | 180 | added 1 changesets with 1 changes to 1 files |
|
181 | 181 | % qpush/qpop error codes |
|
182 | 182 | applying test.patch |
|
183 | 183 | applying test1b.patch |
|
184 | 184 | applying test2.patch |
|
185 | 185 | Now at: test2.patch |
|
186 | 186 | % pops all patches and succeeds |
|
187 | 187 | Patch queue now empty |
|
188 | 188 | qpop -a succeeds |
|
189 | 189 | % does nothing and succeeds |
|
190 | 190 | no patches applied |
|
191 | 191 | qpop -a succeeds |
|
192 | 192 | % fails - nothing else to pop |
|
193 | 193 | no patches applied |
|
194 | 194 | qpop fails |
|
195 | 195 | % pushes a patch and succeeds |
|
196 | 196 | applying test.patch |
|
197 | 197 | Now at: test.patch |
|
198 | 198 | qpush succeeds |
|
199 | 199 | % pops a patch and succeeds |
|
200 | 200 | Patch queue now empty |
|
201 | 201 | qpop succeeds |
|
202 | 202 | % pushes up to test1b.patch and succeeds |
|
203 | 203 | applying test.patch |
|
204 | 204 | applying test1b.patch |
|
205 | 205 | Now at: test1b.patch |
|
206 | 206 | qpush test1b.patch succeeds |
|
207 | 207 | % does nothing and succeeds |
|
208 | 208 | qpush: test1b.patch is already at the top |
|
209 | 209 | qpush test1b.patch succeeds |
|
210 | 210 | % does nothing and succeeds |
|
211 | 211 | qpop: test1b.patch is already at the top |
|
212 | 212 | qpop test1b.patch succeeds |
|
213 | 213 | % fails - can't push to this patch |
|
214 | 214 | abort: cannot push to a previous patch: test.patch |
|
215 | 215 | qpush test.patch fails |
|
216 | 216 | % fails - can't pop to this patch |
|
217 | 217 | abort: patch test2.patch is not applied |
|
218 | 218 | qpop test2.patch fails |
|
219 | 219 | % pops up to test.patch and succeeds |
|
220 | 220 | Now at: test.patch |
|
221 | 221 | qpop test.patch succeeds |
|
222 | 222 | % pushes all patches and succeeds |
|
223 | 223 | applying test1b.patch |
|
224 | 224 | applying test2.patch |
|
225 | 225 | Now at: test2.patch |
|
226 | 226 | qpush -a succeeds |
|
227 | 227 | % does nothing and succeeds |
|
228 | 228 | all patches are currently applied |
|
229 | 229 | qpush -a succeeds |
|
230 | 230 | % fails - nothing else to push |
|
231 | 231 | patch series already fully applied |
|
232 | 232 | qpush fails |
|
233 | 233 | % does nothing and succeeds |
|
234 | 234 | all patches are currently applied |
|
235 | 235 | qpush test2.patch succeeds |
|
236 | 236 | % strip |
|
237 | 237 | adding x |
|
238 | 238 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
239 | 239 | saving bundle to |
|
240 | 240 | adding changesets |
|
241 | 241 | adding manifests |
|
242 | 242 | adding file changes |
|
243 | 243 | added 1 changesets with 1 changes to 1 files |
|
244 | 244 | (run 'hg update' to get a working copy) |
|
245 | 245 | % cd b; hg qrefresh |
|
246 | 246 | adding a |
|
247 | 247 | foo |
|
248 | 248 | |
|
249 | 249 | diff -r cb9a9f314b8b a |
|
250 | 250 | --- a/a |
|
251 | 251 | +++ b/a |
|
252 |
@@ -1,1 +1,2 @@ |
|
|
252 | @@ -1,1 +1,2 @@ | |
|
253 | 253 | a |
|
254 | 254 | +a |
|
255 | 255 | diff -r cb9a9f314b8b b/f |
|
256 | 256 | --- /dev/null |
|
257 | 257 | +++ b/b/f |
|
258 | 258 | @@ -0,0 +1,1 @@ |
|
259 | 259 | +f |
|
260 | 260 | % hg qrefresh . |
|
261 | 261 | foo |
|
262 | 262 | |
|
263 | 263 | diff -r cb9a9f314b8b b/f |
|
264 | 264 | --- /dev/null |
|
265 | 265 | +++ b/b/f |
|
266 | 266 | @@ -0,0 +1,1 @@ |
|
267 | 267 | +f |
|
268 | 268 | M a |
|
269 | 269 | % qpush failure |
|
270 | 270 | Patch queue now empty |
|
271 | 271 | applying foo |
|
272 | 272 | applying bar |
|
273 | 273 | file foo already exists |
|
274 | 274 | 1 out of 1 hunk FAILED -- saving rejects to file foo.rej |
|
275 | 275 | patch failed, unable to continue (try -v) |
|
276 | 276 | patch failed, rejects left in working dir |
|
277 | 277 | Errors during apply, please fix and refresh bar |
|
278 | 278 | ? foo |
|
279 | 279 | ? foo.rej |
|
280 | 280 | % mq tags |
|
281 | 281 | 0 qparent |
|
282 | 282 | 1 qbase foo |
|
283 | 283 | 2 qtip bar tip |
|
284 | 284 | new file |
|
285 | 285 | |
|
286 | 286 | diff --git a/new b/new |
|
287 | 287 | new file mode 100755 |
|
288 | 288 | --- /dev/null |
|
289 | 289 | +++ b/new |
|
290 | 290 | @@ -0,0 +1,1 @@ |
|
291 | 291 | +foo |
|
292 | 292 | copy file |
|
293 | 293 | |
|
294 | 294 | diff --git a/new b/copy |
|
295 | 295 | copy from new |
|
296 | 296 | copy to copy |
|
297 | 297 | Now at: new |
|
298 | 298 | applying copy |
|
299 | 299 | Now at: copy |
|
300 | 300 | diff --git a/new b/copy |
|
301 | 301 | copy from new |
|
302 | 302 | copy to copy |
|
303 | 303 | diff --git a/new b/copy |
|
304 | 304 | copy from new |
|
305 | 305 | copy to copy |
|
306 | 306 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
307 | 307 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
308 | 308 | adding branch |
|
309 | 309 | adding changesets |
|
310 | 310 | adding manifests |
|
311 | 311 | adding file changes |
|
312 | 312 | added 1 changesets with 1 changes to 1 files |
|
313 | 313 | (run 'hg update' to get a working copy) |
|
314 | 314 | Patch queue now empty |
|
315 | 315 | applying bar |
|
316 | 316 | Now at: bar |
|
317 | 317 | diff --git a/bar b/bar |
|
318 | 318 | new file mode 100644 |
|
319 | 319 | --- /dev/null |
|
320 | 320 | +++ b/bar |
|
321 | 321 | @@ -0,0 +1,1 @@ |
|
322 | 322 | +bar |
|
323 | 323 | diff --git a/foo b/baz |
|
324 | 324 | rename from foo |
|
325 | 325 | rename to baz |
|
326 | 326 | 2 baz (foo) |
|
327 | 327 | diff --git a/bar b/bar |
|
328 | 328 | new file mode 100644 |
|
329 | 329 | --- /dev/null |
|
330 | 330 | +++ b/bar |
|
331 | 331 | @@ -0,0 +1,1 @@ |
|
332 | 332 | +bar |
|
333 | 333 | diff --git a/foo b/baz |
|
334 | 334 | rename from foo |
|
335 | 335 | rename to baz |
|
336 | 336 | 2 baz (foo) |
|
337 | 337 | diff --git a/bar b/bar |
|
338 | 338 | diff --git a/foo b/baz |
|
339 | 339 | |
|
340 | 340 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
341 | 341 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
342 | 342 | adding branch |
|
343 | 343 | adding changesets |
|
344 | 344 | adding manifests |
|
345 | 345 | adding file changes |
|
346 | 346 | added 1 changesets with 1 changes to 1 files |
|
347 | 347 | (run 'hg update' to get a working copy) |
|
348 | 348 | Patch queue now empty |
|
349 | 349 | applying bar |
|
350 | 350 | Now at: bar |
|
351 | 351 | diff --git a/foo b/bleh |
|
352 | 352 | rename from foo |
|
353 | 353 | rename to bleh |
|
354 | 354 | diff --git a/quux b/quux |
|
355 | 355 | new file mode 100644 |
|
356 | 356 | --- /dev/null |
|
357 | 357 | +++ b/quux |
|
358 | 358 | @@ -0,0 +1,1 @@ |
|
359 | 359 | +bar |
|
360 | 360 | 3 bleh (foo) |
|
361 | 361 | diff --git a/foo b/barney |
|
362 | 362 | rename from foo |
|
363 | 363 | rename to barney |
|
364 | 364 | diff --git a/fred b/fred |
|
365 | 365 | new file mode 100644 |
|
366 | 366 | --- /dev/null |
|
367 | 367 | +++ b/fred |
|
368 | 368 | @@ -0,0 +1,1 @@ |
|
369 | 369 | +bar |
|
370 | 370 | 3 barney (foo) |
|
371 | 371 | % refresh omitting an added file |
|
372 | 372 | C newfile |
|
373 | 373 | A newfile |
|
374 | 374 | Now at: bar |
|
375 | 375 | % create a git patch |
|
376 | 376 | diff --git a/alexander b/alexander |
|
377 | 377 | % create a git binary patch |
|
378 | 378 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
379 | 379 | diff --git a/bucephalus b/bucephalus |
|
380 | 380 | % check binary patches can be popped and pushed |
|
381 | 381 | Now at: addalexander |
|
382 | 382 | applying addbucephalus |
|
383 | 383 | Now at: addbucephalus |
|
384 | 384 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
385 | 385 | % strip again |
|
386 | 386 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
387 | 387 | merging foo |
|
388 | 388 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
389 | 389 | (branch merge, don't forget to commit) |
|
390 | 390 | changeset: 3:99615015637b |
|
391 | 391 | tag: tip |
|
392 | 392 | parent: 2:20cbbe65cff7 |
|
393 | 393 | parent: 1:d2871fc282d4 |
|
394 | 394 | user: test |
|
395 | 395 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
396 | 396 | summary: merge |
|
397 | 397 | |
|
398 | 398 | changeset: 2:20cbbe65cff7 |
|
399 | 399 | parent: 0:53245c60e682 |
|
400 | 400 | user: test |
|
401 | 401 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
402 | 402 | summary: change foo 2 |
|
403 | 403 | |
|
404 | 404 | changeset: 1:d2871fc282d4 |
|
405 | 405 | user: test |
|
406 | 406 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
407 | 407 | summary: change foo 1 |
|
408 | 408 | |
|
409 | 409 | changeset: 0:53245c60e682 |
|
410 | 410 | user: test |
|
411 | 411 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
412 | 412 | summary: add foo |
|
413 | 413 | |
|
414 | 414 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
415 | 415 | saving bundle to |
|
416 | 416 | saving bundle to |
|
417 | 417 | adding branch |
|
418 | 418 | adding changesets |
|
419 | 419 | adding manifests |
|
420 | 420 | adding file changes |
|
421 | 421 | added 1 changesets with 1 changes to 1 files |
|
422 | 422 | (run 'hg update' to get a working copy) |
|
423 | 423 | changeset: 1:20cbbe65cff7 |
|
424 | 424 | tag: tip |
|
425 | 425 | user: test |
|
426 | 426 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
427 | 427 | summary: change foo 2 |
|
428 | 428 | |
|
429 | 429 | changeset: 0:53245c60e682 |
|
430 | 430 | user: test |
|
431 | 431 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
432 | 432 | summary: add foo |
|
433 | 433 | |
|
434 | 434 | % qclone |
|
435 | 435 | abort: versioned patch repository not found (see qinit -c) |
|
436 | 436 | adding .hg/patches/patch1 |
|
437 | 437 | main repo: |
|
438 | 438 | rev 1: change foo |
|
439 | 439 | rev 0: add foo |
|
440 | 440 | patch repo: |
|
441 | 441 | rev 0: checkpoint |
|
442 | 442 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
443 | 443 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
444 | 444 | main repo: |
|
445 | 445 | rev 0: add foo |
|
446 | 446 | patch repo: |
|
447 | 447 | rev 0: checkpoint |
|
448 | 448 | Patch queue now empty |
|
449 | 449 | main repo: |
|
450 | 450 | rev 0: add foo |
|
451 | 451 | patch repo: |
|
452 | 452 | rev 0: checkpoint |
|
453 | 453 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
454 | 454 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
455 | 455 | main repo: |
|
456 | 456 | rev 0: add foo |
|
457 | 457 | patch repo: |
|
458 | 458 | rev 0: checkpoint |
@@ -1,66 +1,66 b'' | |||
|
1 | 1 | notify extension - No help text available |
|
2 | 2 | |
|
3 | 3 | no commands defined |
|
4 | 4 | % commit |
|
5 | 5 | adding a |
|
6 | 6 | % clone |
|
7 | 7 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
8 | 8 | % commit |
|
9 | 9 | % pull (minimal config) |
|
10 | 10 | pulling from ../a |
|
11 | 11 | searching for changes |
|
12 | 12 | adding changesets |
|
13 | 13 | adding manifests |
|
14 | 14 | adding file changes |
|
15 | 15 | added 1 changesets with 1 changes to 1 files |
|
16 | 16 | Date: |
|
17 | 17 | Subject: changeset in test-notify/b: b |
|
18 | 18 | From: test |
|
19 | 19 | X-Hg-Notification: changeset 0647d048b600 |
|
20 | 20 | Message-Id: |
|
21 | 21 | To: baz, foo@bar |
|
22 | 22 | |
|
23 | 23 | changeset 0647d048b600 in test-notify/b |
|
24 | 24 | details: test-notify/b?cmd=changeset;node=0647d048b600 |
|
25 | 25 | description: |
|
26 | 26 | b |
|
27 | 27 | |
|
28 | 28 | diffs (6 lines): |
|
29 | 29 | |
|
30 | 30 | diff -r cb9a9f314b8b -r 0647d048b600 a |
|
31 | 31 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
32 | 32 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
33 |
@@ -1,1 +1,2 @@ |
|
|
33 | @@ -1,1 +1,2 @@ | |
|
34 | 34 | a |
|
35 | 35 | +a |
|
36 | 36 | (run 'hg update' to get a working copy) |
|
37 | 37 | % fail for config file is missing |
|
38 | 38 | rolling back last transaction |
|
39 | 39 | pull failed |
|
40 | 40 | % pull |
|
41 | 41 | rolling back last transaction |
|
42 | 42 | pulling from ../a |
|
43 | 43 | searching for changes |
|
44 | 44 | adding changesets |
|
45 | 45 | adding manifests |
|
46 | 46 | adding file changes |
|
47 | 47 | added 1 changesets with 1 changes to 1 files |
|
48 | 48 | Date: |
|
49 | 49 | Subject: b |
|
50 | 50 | From: test@test.com |
|
51 | 51 | X-Hg-Notification: changeset 0647d048b600 |
|
52 | 52 | Message-Id: |
|
53 | 53 | To: baz@test.com, foo@bar |
|
54 | 54 | |
|
55 | 55 | changeset 0647d048b600 |
|
56 | 56 | description: |
|
57 | 57 | b |
|
58 | 58 | diffs (6 lines): |
|
59 | 59 | |
|
60 | 60 | diff -r cb9a9f314b8b -r 0647d048b600 a |
|
61 | 61 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
62 | 62 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
63 |
@@ -1,1 +1,2 @@ |
|
|
63 | @@ -1,1 +1,2 @@ | |
|
64 | 64 | a |
|
65 | 65 | +a |
|
66 | 66 | (run 'hg update' to get a working copy) |
@@ -1,22 +1,22 b'' | |||
|
1 | 1 | checking changesets |
|
2 | 2 | checking manifests |
|
3 | 3 | crosschecking files in changesets and manifests |
|
4 | 4 | checking files |
|
5 | 5 | 1 files, 1 changesets, 1 total revisions |
|
6 | 6 | checking changesets |
|
7 | 7 | checking manifests |
|
8 | 8 | crosschecking files in changesets and manifests |
|
9 | 9 | checking files |
|
10 | 10 | verify failed |
|
11 | 11 | checking changesets |
|
12 | 12 | checking manifests |
|
13 | 13 | crosschecking files in changesets and manifests |
|
14 | 14 | checking files |
|
15 | 15 | 1 files, 1 changesets, 1 total revisions |
|
16 | 16 | commit failed |
|
17 | 17 | diff -r c1fab96507ef a |
|
18 | 18 | --- a/a |
|
19 | 19 | +++ b/a |
|
20 |
@@ -1,1 +1,1 @@ |
|
|
20 | @@ -1,1 +1,1 @@ | |
|
21 | 21 | -foo |
|
22 | 22 | +barber |
@@ -1,493 +1,493 b'' | |||
|
1 | 1 | % help |
|
2 | 2 | hg record [OPTION]... [FILE]... |
|
3 | 3 | |
|
4 | 4 | interactively select changes to commit |
|
5 | 5 | |
|
6 | 6 | If a list of files is omitted, all changes reported by "hg status" |
|
7 | 7 | will be candidates for recording. |
|
8 | 8 | |
|
9 | 9 | You will be prompted for whether to record changes to each |
|
10 | 10 | modified file, and for files with multiple changes, for each |
|
11 | 11 | change to use. For each query, the following responses are |
|
12 | 12 | possible: |
|
13 | 13 | |
|
14 | 14 | y - record this change |
|
15 | 15 | n - skip this change |
|
16 | 16 | |
|
17 | 17 | s - skip remaining changes to this file |
|
18 | 18 | f - record remaining changes to this file |
|
19 | 19 | |
|
20 | 20 | d - done, skip remaining changes and files |
|
21 | 21 | a - record all changes to all remaining files |
|
22 | 22 | q - quit, recording no changes |
|
23 | 23 | |
|
24 | 24 | ? - display help |
|
25 | 25 | |
|
26 | 26 | options: |
|
27 | 27 | |
|
28 | 28 | -A --addremove mark new/missing files as added/removed before committing |
|
29 | 29 | -I --include include names matching the given patterns |
|
30 | 30 | -X --exclude exclude names matching the given patterns |
|
31 | 31 | -m --message use <text> as commit message |
|
32 | 32 | -l --logfile read commit message from <file> |
|
33 | 33 | -d --date record datecode as commit date |
|
34 | 34 | -u --user record user as committer |
|
35 | 35 | |
|
36 | 36 | use "hg -v help record" to show global options |
|
37 | 37 | % select no files |
|
38 | 38 | diff --git a/empty-rw b/empty-rw |
|
39 | 39 | new file mode 100644 |
|
40 | 40 | examine changes to 'empty-rw'? [Ynsfdaq?] no changes to record |
|
41 | 41 | |
|
42 | 42 | changeset: -1:000000000000 |
|
43 | 43 | tag: tip |
|
44 | 44 | user: |
|
45 | 45 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | % select files but no hunks |
|
49 | 49 | diff --git a/empty-rw b/empty-rw |
|
50 | 50 | new file mode 100644 |
|
51 | 51 | examine changes to 'empty-rw'? [Ynsfdaq?] transaction abort! |
|
52 | 52 | rollback completed |
|
53 | 53 | abort: empty commit message |
|
54 | 54 | |
|
55 | 55 | changeset: -1:000000000000 |
|
56 | 56 | tag: tip |
|
57 | 57 | user: |
|
58 | 58 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
59 | 59 | |
|
60 | 60 | |
|
61 | 61 | % record empty file |
|
62 | 62 | diff --git a/empty-rw b/empty-rw |
|
63 | 63 | new file mode 100644 |
|
64 | 64 | examine changes to 'empty-rw'? [Ynsfdaq?] |
|
65 | 65 | changeset: 0:c0708cf4e46e |
|
66 | 66 | tag: tip |
|
67 | 67 | user: test |
|
68 | 68 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
69 | 69 | summary: empty |
|
70 | 70 | |
|
71 | 71 | |
|
72 | 72 | % rename empty file |
|
73 | 73 | diff --git a/empty-rw b/empty-rename |
|
74 | 74 | rename from empty-rw |
|
75 | 75 | rename to empty-rename |
|
76 | 76 | examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?] |
|
77 | 77 | changeset: 1:df251d174da3 |
|
78 | 78 | tag: tip |
|
79 | 79 | user: test |
|
80 | 80 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
81 | 81 | summary: rename |
|
82 | 82 | |
|
83 | 83 | |
|
84 | 84 | % copy empty file |
|
85 | 85 | diff --git a/empty-rename b/empty-copy |
|
86 | 86 | copy from empty-rename |
|
87 | 87 | copy to empty-copy |
|
88 | 88 | examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?] |
|
89 | 89 | changeset: 2:b63ea3939f8d |
|
90 | 90 | tag: tip |
|
91 | 91 | user: test |
|
92 | 92 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
93 | 93 | summary: copy |
|
94 | 94 | |
|
95 | 95 | |
|
96 | 96 | % delete empty file |
|
97 | 97 | diff --git a/empty-copy b/empty-copy |
|
98 | 98 | deleted file mode 100644 |
|
99 | 99 | examine changes to 'empty-copy'? [Ynsfdaq?] |
|
100 | 100 | changeset: 3:a2546574bce9 |
|
101 | 101 | tag: tip |
|
102 | 102 | user: test |
|
103 | 103 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
104 | 104 | summary: delete |
|
105 | 105 | |
|
106 | 106 | |
|
107 | 107 | % add binary file |
|
108 | 108 | 1 changesets found |
|
109 | 109 | diff --git a/tip.bundle b/tip.bundle |
|
110 | 110 | new file mode 100644 |
|
111 | 111 | this is a binary file |
|
112 | 112 | examine changes to 'tip.bundle'? [Ynsfdaq?] |
|
113 | 113 | changeset: 4:9e998a545a8b |
|
114 | 114 | tag: tip |
|
115 | 115 | user: test |
|
116 | 116 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
117 | 117 | summary: binary |
|
118 | 118 | |
|
119 | 119 | diff -r a2546574bce9 -r 9e998a545a8b tip.bundle |
|
120 | 120 | Binary file tip.bundle has changed |
|
121 | 121 | |
|
122 | 122 | % change binary file |
|
123 | 123 | 1 changesets found |
|
124 | 124 | diff --git a/tip.bundle b/tip.bundle |
|
125 | 125 | this modifies a binary file (all or nothing) |
|
126 | 126 | examine changes to 'tip.bundle'? [Ynsfdaq?] |
|
127 | 127 | changeset: 5:93d05561507d |
|
128 | 128 | tag: tip |
|
129 | 129 | user: test |
|
130 | 130 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
131 | 131 | summary: binary-change |
|
132 | 132 | |
|
133 | 133 | diff -r 9e998a545a8b -r 93d05561507d tip.bundle |
|
134 | 134 | Binary file tip.bundle has changed |
|
135 | 135 | |
|
136 | 136 | % rename and change binary file |
|
137 | 137 | 1 changesets found |
|
138 | 138 | diff --git a/tip.bundle b/top.bundle |
|
139 | 139 | rename from tip.bundle |
|
140 | 140 | rename to top.bundle |
|
141 | 141 | this modifies a binary file (all or nothing) |
|
142 | 142 | examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?] |
|
143 | 143 | changeset: 6:699cc1bea9aa |
|
144 | 144 | tag: tip |
|
145 | 145 | user: test |
|
146 | 146 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
147 | 147 | summary: binary-change-rename |
|
148 | 148 | |
|
149 | 149 | diff -r 93d05561507d -r 699cc1bea9aa tip.bundle |
|
150 | 150 | Binary file tip.bundle has changed |
|
151 | 151 | diff -r 93d05561507d -r 699cc1bea9aa top.bundle |
|
152 | 152 | Binary file top.bundle has changed |
|
153 | 153 | |
|
154 | 154 | % add plain file |
|
155 | 155 | diff --git a/plain b/plain |
|
156 | 156 | new file mode 100644 |
|
157 | 157 | examine changes to 'plain'? [Ynsfdaq?] |
|
158 | 158 | changeset: 7:118ed744216b |
|
159 | 159 | tag: tip |
|
160 | 160 | user: test |
|
161 | 161 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
162 | 162 | summary: plain |
|
163 | 163 | |
|
164 | 164 | diff -r 699cc1bea9aa -r 118ed744216b plain |
|
165 | 165 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
166 | 166 | +++ b/plain Thu Jan 01 00:00:07 1970 +0000 |
|
167 | 167 | @@ -0,0 +1,10 @@ |
|
168 | 168 | +1 |
|
169 | 169 | +2 |
|
170 | 170 | +3 |
|
171 | 171 | +4 |
|
172 | 172 | +5 |
|
173 | 173 | +6 |
|
174 | 174 | +7 |
|
175 | 175 | +8 |
|
176 | 176 | +9 |
|
177 | 177 | +10 |
|
178 | 178 | |
|
179 | 179 | % modify end of plain file |
|
180 | 180 | diff --git a/plain b/plain |
|
181 | 181 | 1 hunks, 1 lines changed |
|
182 |
examine changes to 'plain'? [Ynsfdaq?] @@ -8,3 +8,4 @@ |
|
|
182 | examine changes to 'plain'? [Ynsfdaq?] @@ -8,3 +8,4 @@ | |
|
183 | 183 | 8 |
|
184 | 184 | 9 |
|
185 | 185 | 10 |
|
186 | 186 | +11 |
|
187 | 187 | record this change to 'plain'? [Ynsfdaq?] % modify end of plain file, no EOL |
|
188 | 188 | diff --git a/plain b/plain |
|
189 | 189 | 1 hunks, 1 lines changed |
|
190 |
examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,4 @@ |
|
|
190 | examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,4 @@ | |
|
191 | 191 | 9 |
|
192 | 192 | 10 |
|
193 | 193 | 11 |
|
194 | 194 | +cf81a2760718a74d44c0c2eecb72f659e63a69c5 |
|
195 | 195 | \ No newline at end of file |
|
196 | 196 | record this change to 'plain'? [Ynsfdaq?] % modify end of plain file, add EOL |
|
197 | 197 | diff --git a/plain b/plain |
|
198 | 198 | 1 hunks, 2 lines changed |
|
199 |
examine changes to 'plain'? [Ynsfdaq?] @@ -9,4 +9,4 @@ |
|
|
199 | examine changes to 'plain'? [Ynsfdaq?] @@ -9,4 +9,4 @@ | |
|
200 | 200 | 9 |
|
201 | 201 | 10 |
|
202 | 202 | 11 |
|
203 | 203 | -cf81a2760718a74d44c0c2eecb72f659e63a69c5 |
|
204 | 204 | \ No newline at end of file |
|
205 | 205 | +cf81a2760718a74d44c0c2eecb72f659e63a69c5 |
|
206 | 206 | record this change to 'plain'? [Ynsfdaq?] % modify beginning, trim end, record both |
|
207 | 207 | diff --git a/plain b/plain |
|
208 | 208 | 2 hunks, 4 lines changed |
|
209 |
examine changes to 'plain'? [Ynsfdaq?] @@ -1,4 +1,4 @@ |
|
|
209 | examine changes to 'plain'? [Ynsfdaq?] @@ -1,4 +1,4 @@ | |
|
210 | 210 | -1 |
|
211 | 211 | +2 |
|
212 | 212 | 2 |
|
213 | 213 | 3 |
|
214 | 214 | 4 |
|
215 |
record this change to 'plain'? [Ynsfdaq?] @@ -8,5 +8,3 @@ |
|
|
215 | record this change to 'plain'? [Ynsfdaq?] @@ -8,5 +8,3 @@ | |
|
216 | 216 | 8 |
|
217 | 217 | 9 |
|
218 | 218 | 10 |
|
219 | 219 | -11 |
|
220 | 220 | -cf81a2760718a74d44c0c2eecb72f659e63a69c5 |
|
221 | 221 | record this change to 'plain'? [Ynsfdaq?] |
|
222 | 222 | changeset: 11:d09ab1967dab |
|
223 | 223 | tag: tip |
|
224 | 224 | user: test |
|
225 | 225 | date: Thu Jan 01 00:00:10 1970 +0000 |
|
226 | 226 | summary: begin-and-end |
|
227 | 227 | |
|
228 | 228 | diff -r e2ecd9b0b78d -r d09ab1967dab plain |
|
229 | 229 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
230 | 230 | +++ b/plain Thu Jan 01 00:00:10 1970 +0000 |
|
231 |
@@ -1,4 +1,4 @@ |
|
|
231 | @@ -1,4 +1,4 @@ | |
|
232 | 232 | -1 |
|
233 | 233 | +2 |
|
234 | 234 | 2 |
|
235 | 235 | 3 |
|
236 | 236 | 4 |
|
237 |
@@ -8,5 +8,3 @@ |
|
|
237 | @@ -8,5 +8,3 @@ | |
|
238 | 238 | 8 |
|
239 | 239 | 9 |
|
240 | 240 | 10 |
|
241 | 241 | -11 |
|
242 | 242 | -cf81a2760718a74d44c0c2eecb72f659e63a69c5 |
|
243 | 243 | |
|
244 | 244 | % trim beginning, modify end |
|
245 | 245 | % record end |
|
246 | 246 | diff --git a/plain b/plain |
|
247 | 247 | 2 hunks, 5 lines changed |
|
248 |
examine changes to 'plain'? [Ynsfdaq?] @@ -1,9 +1,6 @@ |
|
|
248 | examine changes to 'plain'? [Ynsfdaq?] @@ -1,9 +1,6 @@ | |
|
249 | 249 | -2 |
|
250 | 250 | -2 |
|
251 | 251 | -3 |
|
252 | 252 | 4 |
|
253 | 253 | 5 |
|
254 | 254 | 6 |
|
255 | 255 | 7 |
|
256 | 256 | 8 |
|
257 | 257 | 9 |
|
258 | 258 | record this change to 'plain'? [Ynsfdaq?] @@ -4,7 +1,7 @@ |
|
259 | 259 | 4 |
|
260 | 260 | 5 |
|
261 | 261 | 6 |
|
262 | 262 | 7 |
|
263 | 263 | 8 |
|
264 | 264 | 9 |
|
265 | 265 | -10 |
|
266 | 266 | +10.new |
|
267 | 267 | record this change to 'plain'? [Ynsfdaq?] |
|
268 | 268 | changeset: 12:44516c9708ae |
|
269 | 269 | tag: tip |
|
270 | 270 | user: test |
|
271 | 271 | date: Thu Jan 01 00:00:11 1970 +0000 |
|
272 | 272 | summary: end-only |
|
273 | 273 | |
|
274 | 274 | diff -r d09ab1967dab -r 44516c9708ae plain |
|
275 | 275 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
276 | 276 | +++ b/plain Thu Jan 01 00:00:11 1970 +0000 |
|
277 |
@@ -7,4 +7,4 @@ |
|
|
277 | @@ -7,4 +7,4 @@ | |
|
278 | 278 | 7 |
|
279 | 279 | 8 |
|
280 | 280 | 9 |
|
281 | 281 | -10 |
|
282 | 282 | +10.new |
|
283 | 283 | |
|
284 | 284 | % record beginning |
|
285 | 285 | diff --git a/plain b/plain |
|
286 | 286 | 1 hunks, 3 lines changed |
|
287 |
examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,3 @@ |
|
|
287 | examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,3 @@ | |
|
288 | 288 | -2 |
|
289 | 289 | -2 |
|
290 | 290 | -3 |
|
291 | 291 | 4 |
|
292 | 292 | 5 |
|
293 | 293 | 6 |
|
294 | 294 | record this change to 'plain'? [Ynsfdaq?] |
|
295 | 295 | changeset: 13:3ebbace64a8d |
|
296 | 296 | tag: tip |
|
297 | 297 | user: test |
|
298 | 298 | date: Thu Jan 01 00:00:12 1970 +0000 |
|
299 | 299 | summary: begin-only |
|
300 | 300 | |
|
301 | 301 | diff -r 44516c9708ae -r 3ebbace64a8d plain |
|
302 | 302 | --- a/plain Thu Jan 01 00:00:11 1970 +0000 |
|
303 | 303 | +++ b/plain Thu Jan 01 00:00:12 1970 +0000 |
|
304 |
@@ -1,6 +1,3 @@ |
|
|
304 | @@ -1,6 +1,3 @@ | |
|
305 | 305 | -2 |
|
306 | 306 | -2 |
|
307 | 307 | -3 |
|
308 | 308 | 4 |
|
309 | 309 | 5 |
|
310 | 310 | 6 |
|
311 | 311 | |
|
312 | 312 | % add to beginning, trim from end |
|
313 | 313 | % record end |
|
314 | 314 | diff --git a/plain b/plain |
|
315 | 315 | 2 hunks, 4 lines changed |
|
316 |
examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,9 @@ |
|
|
316 | examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,9 @@ | |
|
317 | 317 | +1 |
|
318 | 318 | +2 |
|
319 | 319 | +3 |
|
320 | 320 | 4 |
|
321 | 321 | 5 |
|
322 | 322 | 6 |
|
323 | 323 | 7 |
|
324 | 324 | 8 |
|
325 | 325 | 9 |
|
326 | 326 | record this change to 'plain'? [Ynsfdaq?] @@ -1,7 +4,6 @@ |
|
327 | 327 | 4 |
|
328 | 328 | 5 |
|
329 | 329 | 6 |
|
330 | 330 | 7 |
|
331 | 331 | 8 |
|
332 | 332 | 9 |
|
333 | 333 | -10.new |
|
334 | 334 | record this change to 'plain'? [Ynsfdaq?] % add to beginning, middle, end |
|
335 | 335 | % record beginning, middle |
|
336 | 336 | diff --git a/plain b/plain |
|
337 | 337 | 3 hunks, 7 lines changed |
|
338 |
examine changes to 'plain'? [Ynsfdaq?] @@ -1,2 +1,5 @@ |
|
|
338 | examine changes to 'plain'? [Ynsfdaq?] @@ -1,2 +1,5 @@ | |
|
339 | 339 | +1 |
|
340 | 340 | +2 |
|
341 | 341 | +3 |
|
342 | 342 | 4 |
|
343 | 343 | 5 |
|
344 | 344 | record this change to 'plain'? [Ynsfdaq?] @@ -1,6 +4,8 @@ |
|
345 | 345 | 4 |
|
346 | 346 | 5 |
|
347 | 347 | +5.new |
|
348 | 348 | +5.reallynew |
|
349 | 349 | 6 |
|
350 | 350 | 7 |
|
351 | 351 | 8 |
|
352 | 352 | 9 |
|
353 | 353 | record this change to 'plain'? [Ynsfdaq?] @@ -3,4 +8,6 @@ |
|
354 | 354 | 6 |
|
355 | 355 | 7 |
|
356 | 356 | 8 |
|
357 | 357 | 9 |
|
358 | 358 | +10 |
|
359 | 359 | +11 |
|
360 | 360 | record this change to 'plain'? [Ynsfdaq?] |
|
361 | 361 | changeset: 15:c1c639d8b268 |
|
362 | 362 | tag: tip |
|
363 | 363 | user: test |
|
364 | 364 | date: Thu Jan 01 00:00:14 1970 +0000 |
|
365 | 365 | summary: middle-only |
|
366 | 366 | |
|
367 | 367 | diff -r efc0dad7bd9f -r c1c639d8b268 plain |
|
368 | 368 | --- a/plain Thu Jan 01 00:00:13 1970 +0000 |
|
369 | 369 | +++ b/plain Thu Jan 01 00:00:14 1970 +0000 |
|
370 |
@@ -1,5 +1,10 @@ |
|
|
370 | @@ -1,5 +1,10 @@ | |
|
371 | 371 | +1 |
|
372 | 372 | +2 |
|
373 | 373 | +3 |
|
374 | 374 | 4 |
|
375 | 375 | 5 |
|
376 | 376 | +5.new |
|
377 | 377 | +5.reallynew |
|
378 | 378 | 6 |
|
379 | 379 | 7 |
|
380 | 380 | 8 |
|
381 | 381 | |
|
382 | 382 | % record end |
|
383 | 383 | diff --git a/plain b/plain |
|
384 | 384 | 1 hunks, 2 lines changed |
|
385 |
examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,5 @@ |
|
|
385 | examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,5 @@ | |
|
386 | 386 | 7 |
|
387 | 387 | 8 |
|
388 | 388 | 9 |
|
389 | 389 | +10 |
|
390 | 390 | +11 |
|
391 | 391 | record this change to 'plain'? [Ynsfdaq?] |
|
392 | 392 | changeset: 16:80b74bbc7808 |
|
393 | 393 | tag: tip |
|
394 | 394 | user: test |
|
395 | 395 | date: Thu Jan 01 00:00:15 1970 +0000 |
|
396 | 396 | summary: end-only |
|
397 | 397 | |
|
398 | 398 | diff -r c1c639d8b268 -r 80b74bbc7808 plain |
|
399 | 399 | --- a/plain Thu Jan 01 00:00:14 1970 +0000 |
|
400 | 400 | +++ b/plain Thu Jan 01 00:00:15 1970 +0000 |
|
401 |
@@ -9,3 +9,5 @@ |
|
|
401 | @@ -9,3 +9,5 @@ | |
|
402 | 402 | 7 |
|
403 | 403 | 8 |
|
404 | 404 | 9 |
|
405 | 405 | +10 |
|
406 | 406 | +11 |
|
407 | 407 | |
|
408 | 408 | adding subdir/a |
|
409 | 409 | diff --git a/subdir/a b/subdir/a |
|
410 | 410 | 1 hunks, 1 lines changed |
|
411 |
examine changes to 'subdir/a'? [Ynsfdaq?] @@ -1,1 +1,2 @@ |
|
|
411 | examine changes to 'subdir/a'? [Ynsfdaq?] @@ -1,1 +1,2 @@ | |
|
412 | 412 | a |
|
413 | 413 | +a |
|
414 | 414 | record this change to 'subdir/a'? [Ynsfdaq?] |
|
415 | 415 | changeset: 18:33ff5c4fb017 |
|
416 | 416 | tag: tip |
|
417 | 417 | user: test |
|
418 | 418 | date: Thu Jan 01 00:00:16 1970 +0000 |
|
419 | 419 | summary: subdir-change |
|
420 | 420 | |
|
421 | 421 | diff -r aecf2b2ea83c -r 33ff5c4fb017 subdir/a |
|
422 | 422 | --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
423 | 423 | +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
424 |
@@ -1,1 +1,2 @@ |
|
|
424 | @@ -1,1 +1,2 @@ | |
|
425 | 425 | a |
|
426 | 426 | +a |
|
427 | 427 | |
|
428 | 428 | % help, quit |
|
429 | 429 | diff --git a/subdir/f1 b/subdir/f1 |
|
430 | 430 | 1 hunks, 1 lines changed |
|
431 | 431 | examine changes to 'subdir/f1'? [Ynsfdaq?] y - record this change |
|
432 | 432 | n - skip this change |
|
433 | 433 | s - skip remaining changes to this file |
|
434 | 434 | f - record remaining changes to this file |
|
435 | 435 | d - done, skip remaining changes and files |
|
436 | 436 | a - record all changes to all remaining files |
|
437 | 437 | q - quit, recording no changes |
|
438 | 438 | ? - display help |
|
439 | 439 | examine changes to 'subdir/f1'? [Ynsfdaq?] abort: user quit |
|
440 | 440 | % skip |
|
441 | 441 | diff --git a/subdir/f1 b/subdir/f1 |
|
442 | 442 | 1 hunks, 1 lines changed |
|
443 | 443 | examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2 |
|
444 | 444 | 1 hunks, 1 lines changed |
|
445 | 445 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected |
|
446 | 446 | % no |
|
447 | 447 | diff --git a/subdir/f1 b/subdir/f1 |
|
448 | 448 | 1 hunks, 1 lines changed |
|
449 | 449 | examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2 |
|
450 | 450 | 1 hunks, 1 lines changed |
|
451 | 451 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected |
|
452 | 452 | % f, quit |
|
453 | 453 | diff --git a/subdir/f1 b/subdir/f1 |
|
454 | 454 | 1 hunks, 1 lines changed |
|
455 | 455 | examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2 |
|
456 | 456 | 1 hunks, 1 lines changed |
|
457 | 457 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: user quit |
|
458 | 458 | % s, all |
|
459 | 459 | diff --git a/subdir/f1 b/subdir/f1 |
|
460 | 460 | 1 hunks, 1 lines changed |
|
461 | 461 | examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2 |
|
462 | 462 | 1 hunks, 1 lines changed |
|
463 | 463 | examine changes to 'subdir/f2'? [Ynsfdaq?] |
|
464 | 464 | changeset: 20:094183e04b7c |
|
465 | 465 | tag: tip |
|
466 | 466 | user: test |
|
467 | 467 | date: Thu Jan 01 00:00:18 1970 +0000 |
|
468 | 468 | summary: x |
|
469 | 469 | |
|
470 | 470 | diff -r f9e855cd9374 -r 094183e04b7c subdir/f2 |
|
471 | 471 | --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000 |
|
472 | 472 | +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000 |
|
473 |
@@ -1,1 +1,2 @@ |
|
|
473 | @@ -1,1 +1,2 @@ | |
|
474 | 474 | b |
|
475 | 475 | +b |
|
476 | 476 | |
|
477 | 477 | % f |
|
478 | 478 | diff --git a/subdir/f1 b/subdir/f1 |
|
479 | 479 | 1 hunks, 1 lines changed |
|
480 | 480 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
481 | 481 | changeset: 21:38164785b0ef |
|
482 | 482 | tag: tip |
|
483 | 483 | user: test |
|
484 | 484 | date: Thu Jan 01 00:00:19 1970 +0000 |
|
485 | 485 | summary: y |
|
486 | 486 | |
|
487 | 487 | diff -r 094183e04b7c -r 38164785b0ef subdir/f1 |
|
488 | 488 | --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000 |
|
489 | 489 | +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000 |
|
490 |
@@ -1,1 +1,2 @@ |
|
|
490 | @@ -1,1 +1,2 @@ | |
|
491 | 491 | a |
|
492 | 492 | +a |
|
493 | 493 |
@@ -1,143 +1,143 b'' | |||
|
1 | 1 | adding a |
|
2 | 2 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3 | 3 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 4 | diff -r 33aaa84a386b a |
|
5 | 5 | --- a/a |
|
6 | 6 | +++ b/a |
|
7 |
@@ -1,1 +1,1 @@ |
|
|
7 | @@ -1,1 +1,1 @@ | |
|
8 | 8 | -a |
|
9 | 9 | +abc |
|
10 | 10 | adding b |
|
11 | 11 | M a |
|
12 | 12 | changeset: 0:33aaa84a386b |
|
13 | 13 | user: test |
|
14 | 14 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
15 | 15 | summary: 1 |
|
16 | 16 | |
|
17 | 17 | resolving manifests |
|
18 | 18 | overwrite False partial False |
|
19 | 19 | ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 |
|
20 | 20 | searching for copies back to rev 1 |
|
21 | 21 | unmatched files in other: |
|
22 | 22 | b |
|
23 | 23 | a: versions differ -> m |
|
24 | 24 | b: remote created -> g |
|
25 | 25 | merging a |
|
26 | 26 | my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b |
|
27 | 27 | getting b |
|
28 | 28 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
29 | 29 | changeset: 1:802f095af299 |
|
30 | 30 | tag: tip |
|
31 | 31 | user: test |
|
32 | 32 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
33 | 33 | summary: 2 |
|
34 | 34 | |
|
35 | 35 | resolving manifests |
|
36 | 36 | overwrite False partial False |
|
37 | 37 | ancestor 33aaa84a386b local 802f095af299+ remote 33aaa84a386b |
|
38 | 38 | b: remote deleted -> r |
|
39 | 39 | removing b |
|
40 | 40 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
41 | 41 | changeset: 0:33aaa84a386b |
|
42 | 42 | user: test |
|
43 | 43 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
44 | 44 | summary: 1 |
|
45 | 45 | |
|
46 | 46 | abort: there is nothing to merge - use "hg update" instead |
|
47 | 47 | failed |
|
48 | 48 | changeset: 0:33aaa84a386b |
|
49 | 49 | user: test |
|
50 | 50 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
51 | 51 | summary: 1 |
|
52 | 52 | |
|
53 | 53 | resolving manifests |
|
54 | 54 | overwrite False partial False |
|
55 | 55 | ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 |
|
56 | 56 | searching for copies back to rev 1 |
|
57 | 57 | unmatched files in other: |
|
58 | 58 | b |
|
59 | 59 | a: versions differ -> m |
|
60 | 60 | b: remote created -> g |
|
61 | 61 | merging a |
|
62 | 62 | my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b |
|
63 | 63 | getting b |
|
64 | 64 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
65 | 65 | changeset: 1:802f095af299 |
|
66 | 66 | tag: tip |
|
67 | 67 | user: test |
|
68 | 68 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
69 | 69 | summary: 2 |
|
70 | 70 | |
|
71 | 71 | changeset: 1:802f095af299 |
|
72 | 72 | tag: tip |
|
73 | 73 | user: test |
|
74 | 74 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
75 | 75 | files: a b |
|
76 | 76 | description: |
|
77 | 77 | 2 |
|
78 | 78 | |
|
79 | 79 | |
|
80 | 80 | changeset: 0:33aaa84a386b |
|
81 | 81 | user: test |
|
82 | 82 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
83 | 83 | files: a |
|
84 | 84 | description: |
|
85 | 85 | 1 |
|
86 | 86 | |
|
87 | 87 | |
|
88 | 88 | diff -r 802f095af299 a |
|
89 | 89 | --- a/a |
|
90 | 90 | +++ b/a |
|
91 |
@@ -1,1 +1,1 @@ |
|
|
91 | @@ -1,1 +1,1 @@ | |
|
92 | 92 | -a2 |
|
93 | 93 | +abc |
|
94 | 94 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
95 | 95 | adding b |
|
96 | 96 | M a |
|
97 | 97 | changeset: 1:802f095af299 |
|
98 | 98 | user: test |
|
99 | 99 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
100 | 100 | summary: 2 |
|
101 | 101 | |
|
102 | 102 | abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes |
|
103 | 103 | failed |
|
104 | 104 | abort: outstanding uncommitted changes |
|
105 | 105 | failed |
|
106 | 106 | resolving manifests |
|
107 | 107 | overwrite False partial False |
|
108 | 108 | ancestor 33aaa84a386b local 802f095af299+ remote 030602aee63d |
|
109 | 109 | searching for copies back to rev 1 |
|
110 | 110 | a: versions differ -> m |
|
111 | 111 | b: versions differ -> m |
|
112 | 112 | merging a |
|
113 | 113 | my a@802f095af299+ other a@030602aee63d ancestor a@33aaa84a386b |
|
114 | 114 | merging b |
|
115 | 115 | my b@802f095af299+ other b@030602aee63d ancestor b@000000000000 |
|
116 | 116 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
117 | 117 | (branch merge, don't forget to commit) |
|
118 | 118 | changeset: 1:802f095af299 |
|
119 | 119 | user: test |
|
120 | 120 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
121 | 121 | summary: 2 |
|
122 | 122 | |
|
123 | 123 | changeset: 2:030602aee63d |
|
124 | 124 | tag: tip |
|
125 | 125 | parent: 0:33aaa84a386b |
|
126 | 126 | user: test |
|
127 | 127 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
128 | 128 | summary: 3 |
|
129 | 129 | |
|
130 | 130 | diff -r 802f095af299 a |
|
131 | 131 | --- a/a |
|
132 | 132 | +++ b/a |
|
133 |
@@ -1,1 +1,1 @@ |
|
|
133 | @@ -1,1 +1,1 @@ | |
|
134 | 134 | -a2 |
|
135 | 135 | +abc |
|
136 | 136 | adding a |
|
137 | 137 | pulling from ../a |
|
138 | 138 | requesting all changes |
|
139 | 139 | adding changesets |
|
140 | 140 | adding manifests |
|
141 | 141 | adding file changes |
|
142 | 142 | added 1 changesets with 1 changes to 1 files |
|
143 | 143 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now