Show More
@@ -1,552 +1,553 b'' | |||
|
1 | 1 | # record.py |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2007 Bryan O'Sullivan <bos@serpentine.com> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | 8 | '''commands to interactively select changes for commit/qrefresh''' |
|
9 | 9 | |
|
10 | 10 | from mercurial.i18n import gettext, _ |
|
11 | 11 | from mercurial import cmdutil, commands, extensions, hg, mdiff, patch |
|
12 | 12 | from mercurial import util |
|
13 | 13 | import copy, cStringIO, errno, operator, os, re, tempfile |
|
14 | 14 | |
|
15 | 15 | lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)') |
|
16 | 16 | |
|
17 | 17 | def scanpatch(fp): |
|
18 | 18 | """like patch.iterhunks, but yield different events |
|
19 | 19 | |
|
20 | 20 | - ('file', [header_lines + fromfile + tofile]) |
|
21 | 21 | - ('context', [context_lines]) |
|
22 | 22 | - ('hunk', [hunk_lines]) |
|
23 | 23 | - ('range', (-start,len, +start,len, diffp)) |
|
24 | 24 | """ |
|
25 | 25 | lr = patch.linereader(fp) |
|
26 | 26 | |
|
27 | 27 | def scanwhile(first, p): |
|
28 | 28 | """scan lr while predicate holds""" |
|
29 | 29 | lines = [first] |
|
30 | 30 | while True: |
|
31 | 31 | line = lr.readline() |
|
32 | 32 | if not line: |
|
33 | 33 | break |
|
34 | 34 | if p(line): |
|
35 | 35 | lines.append(line) |
|
36 | 36 | else: |
|
37 | 37 | lr.push(line) |
|
38 | 38 | break |
|
39 | 39 | return lines |
|
40 | 40 | |
|
41 | 41 | while True: |
|
42 | 42 | line = lr.readline() |
|
43 | 43 | if not line: |
|
44 | 44 | break |
|
45 | 45 | if line.startswith('diff --git a/'): |
|
46 | 46 | def notheader(line): |
|
47 | 47 | s = line.split(None, 1) |
|
48 | 48 | return not s or s[0] not in ('---', 'diff') |
|
49 | 49 | header = scanwhile(line, notheader) |
|
50 | 50 | fromfile = lr.readline() |
|
51 | 51 | if fromfile.startswith('---'): |
|
52 | 52 | tofile = lr.readline() |
|
53 | 53 | header += [fromfile, tofile] |
|
54 | 54 | else: |
|
55 | 55 | lr.push(fromfile) |
|
56 | 56 | yield 'file', header |
|
57 | 57 | elif line[0] == ' ': |
|
58 | 58 | yield 'context', scanwhile(line, lambda l: l[0] in ' \\') |
|
59 | 59 | elif line[0] in '-+': |
|
60 | 60 | yield 'hunk', scanwhile(line, lambda l: l[0] in '-+\\') |
|
61 | 61 | else: |
|
62 | 62 | m = lines_re.match(line) |
|
63 | 63 | if m: |
|
64 | 64 | yield 'range', m.groups() |
|
65 | 65 | else: |
|
66 | 66 | raise patch.PatchError('unknown patch content: %r' % line) |
|
67 | 67 | |
|
68 | 68 | class header(object): |
|
69 | 69 | """patch header |
|
70 | 70 | |
|
71 | 71 | XXX shoudn't we move this to mercurial/patch.py ? |
|
72 | 72 | """ |
|
73 | 73 | diff_re = re.compile('diff --git a/(.*) b/(.*)$') |
|
74 | 74 | allhunks_re = re.compile('(?:index|new file|deleted file) ') |
|
75 | 75 | pretty_re = re.compile('(?:new file|deleted file) ') |
|
76 | 76 | special_re = re.compile('(?:index|new|deleted|copy|rename) ') |
|
77 | 77 | |
|
78 | 78 | def __init__(self, header): |
|
79 | 79 | self.header = header |
|
80 | 80 | self.hunks = [] |
|
81 | 81 | |
|
82 | 82 | def binary(self): |
|
83 | 83 | for h in self.header: |
|
84 | 84 | if h.startswith('index '): |
|
85 | 85 | return True |
|
86 | 86 | |
|
87 | 87 | def pretty(self, fp): |
|
88 | 88 | for h in self.header: |
|
89 | 89 | if h.startswith('index '): |
|
90 | 90 | fp.write(_('this modifies a binary file (all or nothing)\n')) |
|
91 | 91 | break |
|
92 | 92 | if self.pretty_re.match(h): |
|
93 | 93 | fp.write(h) |
|
94 | 94 | if self.binary(): |
|
95 | 95 | fp.write(_('this is a binary file\n')) |
|
96 | 96 | break |
|
97 | 97 | if h.startswith('---'): |
|
98 | 98 | fp.write(_('%d hunks, %d lines changed\n') % |
|
99 | 99 | (len(self.hunks), |
|
100 | 100 | sum([h.added + h.removed for h in self.hunks]))) |
|
101 | 101 | break |
|
102 | 102 | fp.write(h) |
|
103 | 103 | |
|
104 | 104 | def write(self, fp): |
|
105 | 105 | fp.write(''.join(self.header)) |
|
106 | 106 | |
|
107 | 107 | def allhunks(self): |
|
108 | 108 | for h in self.header: |
|
109 | 109 | if self.allhunks_re.match(h): |
|
110 | 110 | return True |
|
111 | 111 | |
|
112 | 112 | def files(self): |
|
113 | 113 | fromfile, tofile = self.diff_re.match(self.header[0]).groups() |
|
114 | 114 | if fromfile == tofile: |
|
115 | 115 | return [fromfile] |
|
116 | 116 | return [fromfile, tofile] |
|
117 | 117 | |
|
118 | 118 | def filename(self): |
|
119 | 119 | return self.files()[-1] |
|
120 | 120 | |
|
121 | 121 | def __repr__(self): |
|
122 | 122 | return '<header %s>' % (' '.join(map(repr, self.files()))) |
|
123 | 123 | |
|
124 | 124 | def special(self): |
|
125 | 125 | for h in self.header: |
|
126 | 126 | if self.special_re.match(h): |
|
127 | 127 | return True |
|
128 | 128 | |
|
129 | 129 | def countchanges(hunk): |
|
130 | 130 | """hunk -> (n+,n-)""" |
|
131 | 131 | add = len([h for h in hunk if h[0] == '+']) |
|
132 | 132 | rem = len([h for h in hunk if h[0] == '-']) |
|
133 | 133 | return add, rem |
|
134 | 134 | |
|
135 | 135 | class hunk(object): |
|
136 | 136 | """patch hunk |
|
137 | 137 | |
|
138 | 138 | XXX shouldn't we merge this with patch.hunk ? |
|
139 | 139 | """ |
|
140 | 140 | maxcontext = 3 |
|
141 | 141 | |
|
142 | 142 | def __init__(self, header, fromline, toline, proc, before, hunk, after): |
|
143 | 143 | def trimcontext(number, lines): |
|
144 | 144 | delta = len(lines) - self.maxcontext |
|
145 | 145 | if False and delta > 0: |
|
146 | 146 | return number + delta, lines[:self.maxcontext] |
|
147 | 147 | return number, lines |
|
148 | 148 | |
|
149 | 149 | self.header = header |
|
150 | 150 | self.fromline, self.before = trimcontext(fromline, before) |
|
151 | 151 | self.toline, self.after = trimcontext(toline, after) |
|
152 | 152 | self.proc = proc |
|
153 | 153 | self.hunk = hunk |
|
154 | 154 | self.added, self.removed = countchanges(self.hunk) |
|
155 | 155 | |
|
156 | 156 | def write(self, fp): |
|
157 | 157 | delta = len(self.before) + len(self.after) |
|
158 | 158 | if self.after and self.after[-1] == '\\ No newline at end of file\n': |
|
159 | 159 | delta -= 1 |
|
160 | 160 | fromlen = delta + self.removed |
|
161 | 161 | tolen = delta + self.added |
|
162 | 162 | fp.write('@@ -%d,%d +%d,%d @@%s\n' % |
|
163 | 163 | (self.fromline, fromlen, self.toline, tolen, |
|
164 | 164 | self.proc and (' ' + self.proc))) |
|
165 | 165 | fp.write(''.join(self.before + self.hunk + self.after)) |
|
166 | 166 | |
|
167 | 167 | pretty = write |
|
168 | 168 | |
|
169 | 169 | def filename(self): |
|
170 | 170 | return self.header.filename() |
|
171 | 171 | |
|
172 | 172 | def __repr__(self): |
|
173 | 173 | return '<hunk %r@%d>' % (self.filename(), self.fromline) |
|
174 | 174 | |
|
175 | 175 | def parsepatch(fp): |
|
176 | 176 | """patch -> [] of hunks """ |
|
177 | 177 | class parser(object): |
|
178 | 178 | """patch parsing state machine""" |
|
179 | 179 | def __init__(self): |
|
180 | 180 | self.fromline = 0 |
|
181 | 181 | self.toline = 0 |
|
182 | 182 | self.proc = '' |
|
183 | 183 | self.header = None |
|
184 | 184 | self.context = [] |
|
185 | 185 | self.before = [] |
|
186 | 186 | self.hunk = [] |
|
187 | 187 | self.stream = [] |
|
188 | 188 | |
|
189 | 189 | def addrange(self, (fromstart, fromend, tostart, toend, proc)): |
|
190 | 190 | self.fromline = int(fromstart) |
|
191 | 191 | self.toline = int(tostart) |
|
192 | 192 | self.proc = proc |
|
193 | 193 | |
|
194 | 194 | def addcontext(self, context): |
|
195 | 195 | if self.hunk: |
|
196 | 196 | h = hunk(self.header, self.fromline, self.toline, self.proc, |
|
197 | 197 | self.before, self.hunk, context) |
|
198 | 198 | self.header.hunks.append(h) |
|
199 | 199 | self.stream.append(h) |
|
200 | 200 | self.fromline += len(self.before) + h.removed |
|
201 | 201 | self.toline += len(self.before) + h.added |
|
202 | 202 | self.before = [] |
|
203 | 203 | self.hunk = [] |
|
204 | 204 | self.proc = '' |
|
205 | 205 | self.context = context |
|
206 | 206 | |
|
207 | 207 | def addhunk(self, hunk): |
|
208 | 208 | if self.context: |
|
209 | 209 | self.before = self.context |
|
210 | 210 | self.context = [] |
|
211 | 211 | self.hunk = hunk |
|
212 | 212 | |
|
213 | 213 | def newfile(self, hdr): |
|
214 | 214 | self.addcontext([]) |
|
215 | 215 | h = header(hdr) |
|
216 | 216 | self.stream.append(h) |
|
217 | 217 | self.header = h |
|
218 | 218 | |
|
219 | 219 | def finished(self): |
|
220 | 220 | self.addcontext([]) |
|
221 | 221 | return self.stream |
|
222 | 222 | |
|
223 | 223 | transitions = { |
|
224 | 224 | 'file': {'context': addcontext, |
|
225 | 225 | 'file': newfile, |
|
226 | 226 | 'hunk': addhunk, |
|
227 | 227 | 'range': addrange}, |
|
228 | 228 | 'context': {'file': newfile, |
|
229 | 229 | 'hunk': addhunk, |
|
230 | 230 | 'range': addrange}, |
|
231 | 231 | 'hunk': {'context': addcontext, |
|
232 | 232 | 'file': newfile, |
|
233 | 233 | 'range': addrange}, |
|
234 | 234 | 'range': {'context': addcontext, |
|
235 | 235 | 'hunk': addhunk}, |
|
236 | 236 | } |
|
237 | 237 | |
|
238 | 238 | p = parser() |
|
239 | 239 | |
|
240 | 240 | state = 'context' |
|
241 | 241 | for newstate, data in scanpatch(fp): |
|
242 | 242 | try: |
|
243 | 243 | p.transitions[state][newstate](p, data) |
|
244 | 244 | except KeyError: |
|
245 | 245 | raise patch.PatchError('unhandled transition: %s -> %s' % |
|
246 | 246 | (state, newstate)) |
|
247 | 247 | state = newstate |
|
248 | 248 | return p.finished() |
|
249 | 249 | |
|
250 | 250 | def filterpatch(ui, chunks): |
|
251 | 251 | """Interactively filter patch chunks into applied-only chunks""" |
|
252 | 252 | chunks = list(chunks) |
|
253 | 253 | chunks.reverse() |
|
254 | 254 | seen = set() |
|
255 | 255 | def consumefile(): |
|
256 | 256 | """fetch next portion from chunks until a 'header' is seen |
|
257 | 257 | NB: header == new-file mark |
|
258 | 258 | """ |
|
259 | 259 | consumed = [] |
|
260 | 260 | while chunks: |
|
261 | 261 | if isinstance(chunks[-1], header): |
|
262 | 262 | break |
|
263 | 263 | else: |
|
264 | 264 | consumed.append(chunks.pop()) |
|
265 | 265 | return consumed |
|
266 | 266 | |
|
267 | 267 | resp_all = [None] # this two are changed from inside prompt, |
|
268 | 268 | resp_file = [None] # so can't be usual variables |
|
269 | 269 | applied = {} # 'filename' -> [] of chunks |
|
270 | 270 | def prompt(query): |
|
271 | 271 | """prompt query, and process base inputs |
|
272 | 272 | |
|
273 | 273 | - y/n for the rest of file |
|
274 | 274 | - y/n for the rest |
|
275 | 275 | - ? (help) |
|
276 | 276 | - q (quit) |
|
277 | 277 | |
|
278 | 278 | Returns True/False and sets reps_all and resp_file as |
|
279 | 279 | appropriate. |
|
280 | 280 | """ |
|
281 | 281 | if resp_all[0] is not None: |
|
282 | 282 | return resp_all[0] |
|
283 | 283 | if resp_file[0] is not None: |
|
284 | 284 | return resp_file[0] |
|
285 | 285 | while True: |
|
286 | 286 | resps = _('[Ynsfdaq?]') |
|
287 | 287 | choices = (_('&Yes, record this change'), |
|
288 | 288 | _('&No, skip this change'), |
|
289 | 289 | _('&Skip remaining changes to this file'), |
|
290 | 290 | _('Record remaining changes to this &file'), |
|
291 | 291 | _('&Done, skip remaining changes and files'), |
|
292 | 292 | _('Record &all changes to all remaining files'), |
|
293 | 293 | _('&Quit, recording no changes'), |
|
294 | 294 | _('&?')) |
|
295 | 295 | r = ui.promptchoice("%s %s" % (query, resps), choices) |
|
296 | ui.write("\n") | |
|
296 | 297 | if r == 7: # ? |
|
297 | 298 | doc = gettext(record.__doc__) |
|
298 | 299 | c = doc.find(_('y - record this change')) |
|
299 | 300 | for l in doc[c:].splitlines(): |
|
300 | 301 | if l: |
|
301 | 302 | ui.write(l.strip(), '\n') |
|
302 | 303 | continue |
|
303 | 304 | elif r == 0: # yes |
|
304 | 305 | ret = True |
|
305 | 306 | elif r == 1: # no |
|
306 | 307 | ret = False |
|
307 | 308 | elif r == 2: # Skip |
|
308 | 309 | ret = resp_file[0] = False |
|
309 | 310 | elif r == 3: # file (Record remaining) |
|
310 | 311 | ret = resp_file[0] = True |
|
311 | 312 | elif r == 4: # done, skip remaining |
|
312 | 313 | ret = resp_all[0] = False |
|
313 | 314 | elif r == 5: # all |
|
314 | 315 | ret = resp_all[0] = True |
|
315 | 316 | elif r == 6: # quit |
|
316 | 317 | raise util.Abort(_('user quit')) |
|
317 | 318 | return ret |
|
318 | 319 | pos, total = 0, len(chunks) - 1 |
|
319 | 320 | while chunks: |
|
320 | 321 | pos = total - len(chunks) + 1 |
|
321 | 322 | chunk = chunks.pop() |
|
322 | 323 | if isinstance(chunk, header): |
|
323 | 324 | # new-file mark |
|
324 | 325 | resp_file = [None] |
|
325 | 326 | fixoffset = 0 |
|
326 | 327 | hdr = ''.join(chunk.header) |
|
327 | 328 | if hdr in seen: |
|
328 | 329 | consumefile() |
|
329 | 330 | continue |
|
330 | 331 | seen.add(hdr) |
|
331 | 332 | if resp_all[0] is None: |
|
332 | 333 | chunk.pretty(ui) |
|
333 | 334 | r = prompt(_('examine changes to %s?') % |
|
334 | 335 | _(' and ').join(map(repr, chunk.files()))) |
|
335 | 336 | if r: |
|
336 | 337 | applied[chunk.filename()] = [chunk] |
|
337 | 338 | if chunk.allhunks(): |
|
338 | 339 | applied[chunk.filename()] += consumefile() |
|
339 | 340 | else: |
|
340 | 341 | consumefile() |
|
341 | 342 | else: |
|
342 | 343 | # new hunk |
|
343 | 344 | if resp_file[0] is None and resp_all[0] is None: |
|
344 | 345 | chunk.pretty(ui) |
|
345 | 346 | r = total == 1 and prompt(_('record this change to %r?') % |
|
346 | 347 | chunk.filename()) \ |
|
347 | 348 | or prompt(_('record change %d/%d to %r?') % |
|
348 | 349 | (pos, total, chunk.filename())) |
|
349 | 350 | if r: |
|
350 | 351 | if fixoffset: |
|
351 | 352 | chunk = copy.copy(chunk) |
|
352 | 353 | chunk.toline += fixoffset |
|
353 | 354 | applied[chunk.filename()].append(chunk) |
|
354 | 355 | else: |
|
355 | 356 | fixoffset += chunk.removed - chunk.added |
|
356 | 357 | return reduce(operator.add, [h for h in applied.itervalues() |
|
357 | 358 | if h[0].special() or len(h) > 1], []) |
|
358 | 359 | |
|
359 | 360 | def record(ui, repo, *pats, **opts): |
|
360 | 361 | '''interactively select changes to commit |
|
361 | 362 | |
|
362 | 363 | If a list of files is omitted, all changes reported by "hg status" |
|
363 | 364 | will be candidates for recording. |
|
364 | 365 | |
|
365 | 366 | See 'hg help dates' for a list of formats valid for -d/--date. |
|
366 | 367 | |
|
367 | 368 | You will be prompted for whether to record changes to each |
|
368 | 369 | modified file, and for files with multiple changes, for each |
|
369 | 370 | change to use. For each query, the following responses are |
|
370 | 371 | possible:: |
|
371 | 372 | |
|
372 | 373 | y - record this change |
|
373 | 374 | n - skip this change |
|
374 | 375 | |
|
375 | 376 | s - skip remaining changes to this file |
|
376 | 377 | f - record remaining changes to this file |
|
377 | 378 | |
|
378 | 379 | d - done, skip remaining changes and files |
|
379 | 380 | a - record all changes to all remaining files |
|
380 | 381 | q - quit, recording no changes |
|
381 | 382 | |
|
382 | 383 | ? - display help''' |
|
383 | 384 | |
|
384 | 385 | dorecord(ui, repo, commands.commit, *pats, **opts) |
|
385 | 386 | |
|
386 | 387 | |
|
387 | 388 | def qrecord(ui, repo, patch, *pats, **opts): |
|
388 | 389 | '''interactively record a new patch |
|
389 | 390 | |
|
390 | 391 | See 'hg help qnew' & 'hg help record' for more information and |
|
391 | 392 | usage. |
|
392 | 393 | ''' |
|
393 | 394 | |
|
394 | 395 | try: |
|
395 | 396 | mq = extensions.find('mq') |
|
396 | 397 | except KeyError: |
|
397 | 398 | raise util.Abort(_("'mq' extension not loaded")) |
|
398 | 399 | |
|
399 | 400 | def committomq(ui, repo, *pats, **opts): |
|
400 | 401 | mq.new(ui, repo, patch, *pats, **opts) |
|
401 | 402 | |
|
402 | 403 | opts = opts.copy() |
|
403 | 404 | opts['force'] = True # always 'qnew -f' |
|
404 | 405 | dorecord(ui, repo, committomq, *pats, **opts) |
|
405 | 406 | |
|
406 | 407 | |
|
407 | 408 | def dorecord(ui, repo, commitfunc, *pats, **opts): |
|
408 | 409 | if not ui.interactive(): |
|
409 | 410 | raise util.Abort(_('running non-interactively, use commit instead')) |
|
410 | 411 | |
|
411 | 412 | def recordfunc(ui, repo, message, match, opts): |
|
412 | 413 | """This is generic record driver. |
|
413 | 414 | |
|
414 | 415 | Its job is to interactively filter local changes, and accordingly |
|
415 | 416 | prepare working dir into a state, where the job can be delegated to |
|
416 | 417 | non-interactive commit command such as 'commit' or 'qrefresh'. |
|
417 | 418 | |
|
418 | 419 | After the actual job is done by non-interactive command, working dir |
|
419 | 420 | state is restored to original. |
|
420 | 421 | |
|
421 | 422 | In the end we'll record intresting changes, and everything else will be |
|
422 | 423 | left in place, so the user can continue his work. |
|
423 | 424 | """ |
|
424 | 425 | |
|
425 | 426 | changes = repo.status(match=match)[:3] |
|
426 | 427 | diffopts = mdiff.diffopts(git=True, nodates=True) |
|
427 | 428 | chunks = patch.diff(repo, changes=changes, opts=diffopts) |
|
428 | 429 | fp = cStringIO.StringIO() |
|
429 | 430 | fp.write(''.join(chunks)) |
|
430 | 431 | fp.seek(0) |
|
431 | 432 | |
|
432 | 433 | # 1. filter patch, so we have intending-to apply subset of it |
|
433 | 434 | chunks = filterpatch(ui, parsepatch(fp)) |
|
434 | 435 | del fp |
|
435 | 436 | |
|
436 | 437 | contenders = set() |
|
437 | 438 | for h in chunks: |
|
438 | 439 | try: |
|
439 | 440 | contenders.update(set(h.files())) |
|
440 | 441 | except AttributeError: |
|
441 | 442 | pass |
|
442 | 443 | |
|
443 | 444 | changed = changes[0] + changes[1] + changes[2] |
|
444 | 445 | newfiles = [f for f in changed if f in contenders] |
|
445 | 446 | if not newfiles: |
|
446 | 447 | ui.status(_('no changes to record\n')) |
|
447 | 448 | return 0 |
|
448 | 449 | |
|
449 | 450 | modified = set(changes[0]) |
|
450 | 451 | |
|
451 | 452 | # 2. backup changed files, so we can restore them in the end |
|
452 | 453 | backups = {} |
|
453 | 454 | backupdir = repo.join('record-backups') |
|
454 | 455 | try: |
|
455 | 456 | os.mkdir(backupdir) |
|
456 | 457 | except OSError, err: |
|
457 | 458 | if err.errno != errno.EEXIST: |
|
458 | 459 | raise |
|
459 | 460 | try: |
|
460 | 461 | # backup continues |
|
461 | 462 | for f in newfiles: |
|
462 | 463 | if f not in modified: |
|
463 | 464 | continue |
|
464 | 465 | fd, tmpname = tempfile.mkstemp(prefix=f.replace('/', '_')+'.', |
|
465 | 466 | dir=backupdir) |
|
466 | 467 | os.close(fd) |
|
467 | 468 | ui.debug('backup %r as %r\n' % (f, tmpname)) |
|
468 | 469 | util.copyfile(repo.wjoin(f), tmpname) |
|
469 | 470 | backups[f] = tmpname |
|
470 | 471 | |
|
471 | 472 | fp = cStringIO.StringIO() |
|
472 | 473 | for c in chunks: |
|
473 | 474 | if c.filename() in backups: |
|
474 | 475 | c.write(fp) |
|
475 | 476 | dopatch = fp.tell() |
|
476 | 477 | fp.seek(0) |
|
477 | 478 | |
|
478 | 479 | # 3a. apply filtered patch to clean repo (clean) |
|
479 | 480 | if backups: |
|
480 | 481 | hg.revert(repo, repo.dirstate.parents()[0], backups.has_key) |
|
481 | 482 | |
|
482 | 483 | # 3b. (apply) |
|
483 | 484 | if dopatch: |
|
484 | 485 | try: |
|
485 | 486 | ui.debug('applying patch\n') |
|
486 | 487 | ui.debug(fp.getvalue()) |
|
487 | 488 | pfiles = {} |
|
488 | 489 | patch.internalpatch(fp, ui, 1, repo.root, files=pfiles, |
|
489 | 490 | eolmode=None) |
|
490 | 491 | patch.updatedir(ui, repo, pfiles) |
|
491 | 492 | except patch.PatchError, err: |
|
492 | 493 | s = str(err) |
|
493 | 494 | if s: |
|
494 | 495 | raise util.Abort(s) |
|
495 | 496 | else: |
|
496 | 497 | raise util.Abort(_('patch failed to apply')) |
|
497 | 498 | del fp |
|
498 | 499 | |
|
499 | 500 | # 4. We prepared working directory according to filtered patch. |
|
500 | 501 | # Now is the time to delegate the job to commit/qrefresh or the like! |
|
501 | 502 | |
|
502 | 503 | # it is important to first chdir to repo root -- we'll call a |
|
503 | 504 | # highlevel command with list of pathnames relative to repo root |
|
504 | 505 | cwd = os.getcwd() |
|
505 | 506 | os.chdir(repo.root) |
|
506 | 507 | try: |
|
507 | 508 | commitfunc(ui, repo, *newfiles, **opts) |
|
508 | 509 | finally: |
|
509 | 510 | os.chdir(cwd) |
|
510 | 511 | |
|
511 | 512 | return 0 |
|
512 | 513 | finally: |
|
513 | 514 | # 5. finally restore backed-up files |
|
514 | 515 | try: |
|
515 | 516 | for realname, tmpname in backups.iteritems(): |
|
516 | 517 | ui.debug('restoring %r to %r\n' % (tmpname, realname)) |
|
517 | 518 | util.copyfile(tmpname, repo.wjoin(realname)) |
|
518 | 519 | os.unlink(tmpname) |
|
519 | 520 | os.rmdir(backupdir) |
|
520 | 521 | except OSError: |
|
521 | 522 | pass |
|
522 | 523 | return cmdutil.commit(ui, repo, recordfunc, pats, opts) |
|
523 | 524 | |
|
524 | 525 | cmdtable = { |
|
525 | 526 | "record": |
|
526 | 527 | (record, |
|
527 | 528 | |
|
528 | 529 | # add commit options |
|
529 | 530 | commands.table['^commit|ci'][1], |
|
530 | 531 | |
|
531 | 532 | _('hg record [OPTION]... [FILE]...')), |
|
532 | 533 | } |
|
533 | 534 | |
|
534 | 535 | |
|
535 | 536 | def uisetup(ui): |
|
536 | 537 | try: |
|
537 | 538 | mq = extensions.find('mq') |
|
538 | 539 | except KeyError: |
|
539 | 540 | return |
|
540 | 541 | |
|
541 | 542 | qcmdtable = { |
|
542 | 543 | "qrecord": |
|
543 | 544 | (qrecord, |
|
544 | 545 | |
|
545 | 546 | # add qnew options, except '--force' |
|
546 | 547 | [opt for opt in mq.cmdtable['qnew'][1] if opt[1] != 'force'], |
|
547 | 548 | |
|
548 | 549 | _('hg qrecord [OPTION]... PATCH [FILE]...')), |
|
549 | 550 | } |
|
550 | 551 | |
|
551 | 552 | cmdtable.update(qcmdtable) |
|
552 | 553 |
@@ -1,59 +1,63 b'' | |||
|
1 | 1 | adding a |
|
2 | 2 | % default context |
|
3 | 3 | [0;1mdiff -r cf9f4ba66af2 a[0m |
|
4 | 4 | [0;31;1m--- a/a[0m |
|
5 | 5 | [0;32;1m+++ b/a[0m |
|
6 | 6 | [0;35m@@ -2,7 +2,7 @@[0m |
|
7 | 7 | c |
|
8 | 8 | a |
|
9 | 9 | a |
|
10 | 10 | [0;31m-b[0m |
|
11 | 11 | [0;32m+dd[0m |
|
12 | 12 | a |
|
13 | 13 | a |
|
14 | 14 | c |
|
15 | 15 | % --unified=2 |
|
16 | 16 | [0;1mdiff -r cf9f4ba66af2 a[0m |
|
17 | 17 | [0;31;1m--- a/a[0m |
|
18 | 18 | [0;32;1m+++ b/a[0m |
|
19 | 19 | [0;35m@@ -3,5 +3,5 @@[0m |
|
20 | 20 | a |
|
21 | 21 | a |
|
22 | 22 | [0;31m-b[0m |
|
23 | 23 | [0;32m+dd[0m |
|
24 | 24 | a |
|
25 | 25 | a |
|
26 | 26 | % diffstat |
|
27 | 27 | a | 2 [0;32m+[0m[0;31m-[0m |
|
28 | 28 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
29 | 29 | % record |
|
30 | 30 | [0;1mdiff --git a/a b/a[0m |
|
31 | 31 | [0;36;1mold mode 100644[0m |
|
32 | 32 | [0;36;1mnew mode 100755[0m |
|
33 | 33 | 1 hunks, 2 lines changed |
|
34 |
examine changes to 'a'? [Ynsfdaq?] |
|
|
34 | examine changes to 'a'? [Ynsfdaq?] | |
|
35 | [0;35m@@ -2,7 +2,7 @@[0m | |
|
35 | 36 | c |
|
36 | 37 | a |
|
37 | 38 | a |
|
38 | 39 | [0;31m-b[0m |
|
39 | 40 | [0;32m+dd[0m |
|
40 | 41 | a |
|
41 | 42 | a |
|
42 | 43 | c |
|
43 | 44 | record this change to 'a'? [Ynsfdaq?] |
|
45 | ||
|
44 | 46 | rolling back last transaction |
|
45 | 47 | % qrecord |
|
46 | 48 | [0;1mdiff --git a/a b/a[0m |
|
47 | 49 | [0;36;1mold mode 100644[0m |
|
48 | 50 | [0;36;1mnew mode 100755[0m |
|
49 | 51 | 1 hunks, 2 lines changed |
|
50 |
examine changes to 'a'? [Ynsfdaq?] |
|
|
52 | examine changes to 'a'? [Ynsfdaq?] | |
|
53 | [0;35m@@ -2,7 +2,7 @@[0m | |
|
51 | 54 | c |
|
52 | 55 | a |
|
53 | 56 | a |
|
54 | 57 | [0;31m-b[0m |
|
55 | 58 | [0;32m+dd[0m |
|
56 | 59 | a |
|
57 | 60 | a |
|
58 | 61 | c |
|
59 | 62 | record this change to 'a'? [Ynsfdaq?] |
|
63 |
@@ -1,208 +1,218 b'' | |||
|
1 | 1 | % help (no mq, so no qrecord) |
|
2 | 2 | hg: unknown command 'qrecord' |
|
3 | 3 | Mercurial Distributed SCM |
|
4 | 4 | |
|
5 | 5 | basic commands: |
|
6 | 6 | |
|
7 | 7 | add add the specified files on the next commit |
|
8 | 8 | annotate show changeset information by line for each file |
|
9 | 9 | clone make a copy of an existing repository |
|
10 | 10 | commit commit the specified files or all outstanding changes |
|
11 | 11 | diff diff repository (or selected files) |
|
12 | 12 | export dump the header and diffs for one or more changesets |
|
13 | 13 | forget forget the specified files on the next commit |
|
14 | 14 | init create a new repository in the given directory |
|
15 | 15 | log show revision history of entire repository or files |
|
16 | 16 | merge merge working directory with another revision |
|
17 | 17 | pull pull changes from the specified source |
|
18 | 18 | push push changes to the specified destination |
|
19 | 19 | remove remove the specified files on the next commit |
|
20 | 20 | serve export the repository via HTTP |
|
21 | 21 | status show changed files in the working directory |
|
22 | 22 | summary summarize working directory state |
|
23 | 23 | update update working directory |
|
24 | 24 | |
|
25 | 25 | use "hg help" for the full list of commands or "hg -v" for details |
|
26 | 26 | % help (mq present) |
|
27 | 27 | hg qrecord [OPTION]... PATCH [FILE]... |
|
28 | 28 | |
|
29 | 29 | interactively record a new patch |
|
30 | 30 | |
|
31 | 31 | See 'hg help qnew' & 'hg help record' for more information and usage. |
|
32 | 32 | |
|
33 | 33 | options: |
|
34 | 34 | |
|
35 | 35 | -e --edit edit commit message |
|
36 | 36 | -g --git use git extended diff format |
|
37 | 37 | -U --currentuser add "From: <current user>" to patch |
|
38 | 38 | -u --user add "From: <given user>" to patch |
|
39 | 39 | -D --currentdate add "Date: <current date>" to patch |
|
40 | 40 | -d --date add "Date: <given date>" to patch |
|
41 | 41 | -I --include include names matching the given patterns |
|
42 | 42 | -X --exclude exclude names matching the given patterns |
|
43 | 43 | -m --message use <text> as commit message |
|
44 | 44 | -l --logfile read commit message from <file> |
|
45 | 45 | |
|
46 | 46 | use "hg -v help qrecord" to show global options |
|
47 | 47 | % base commit |
|
48 | 48 | % changing files |
|
49 | 49 | % whole diff |
|
50 | 50 | diff -r 1057167b20ef 1.txt |
|
51 | 51 | --- a/1.txt |
|
52 | 52 | +++ b/1.txt |
|
53 | 53 | @@ -1,5 +1,5 @@ |
|
54 | 54 | 1 |
|
55 | 55 | -2 |
|
56 | 56 | +2 2 |
|
57 | 57 | 3 |
|
58 | 58 | -4 |
|
59 | 59 | +4 4 |
|
60 | 60 | 5 |
|
61 | 61 | diff -r 1057167b20ef 2.txt |
|
62 | 62 | --- a/2.txt |
|
63 | 63 | +++ b/2.txt |
|
64 | 64 | @@ -1,5 +1,5 @@ |
|
65 | 65 | a |
|
66 | 66 | -b |
|
67 | 67 | +b b |
|
68 | 68 | c |
|
69 | 69 | d |
|
70 | 70 | e |
|
71 | 71 | diff -r 1057167b20ef dir/a.txt |
|
72 | 72 | --- a/dir/a.txt |
|
73 | 73 | +++ b/dir/a.txt |
|
74 | 74 | @@ -1,4 +1,4 @@ |
|
75 | 75 | -hello world |
|
76 | 76 | +hello world! |
|
77 | 77 | |
|
78 | 78 | someone |
|
79 | 79 | up |
|
80 | 80 | % qrecord a.patch |
|
81 | 81 | diff --git a/1.txt b/1.txt |
|
82 | 82 | 2 hunks, 4 lines changed |
|
83 |
examine changes to '1.txt'? [Ynsfdaq?] |
|
|
83 | examine changes to '1.txt'? [Ynsfdaq?] | |
|
84 | @@ -1,3 +1,3 @@ | |
|
84 | 85 | 1 |
|
85 | 86 | -2 |
|
86 | 87 | +2 2 |
|
87 | 88 | 3 |
|
88 |
record change 1/6 to '1.txt'? [Ynsfdaq?] |
|
|
89 | record change 1/6 to '1.txt'? [Ynsfdaq?] | |
|
90 | @@ -3,3 +3,3 @@ | |
|
89 | 91 | 3 |
|
90 | 92 | -4 |
|
91 | 93 | +4 4 |
|
92 | 94 | 5 |
|
93 |
record change 2/6 to '1.txt'? [Ynsfdaq?] |
|
|
95 | record change 2/6 to '1.txt'? [Ynsfdaq?] | |
|
96 | diff --git a/2.txt b/2.txt | |
|
94 | 97 | 1 hunks, 2 lines changed |
|
95 |
examine changes to '2.txt'? [Ynsfdaq?] |
|
|
98 | examine changes to '2.txt'? [Ynsfdaq?] | |
|
99 | @@ -1,5 +1,5 @@ | |
|
96 | 100 | a |
|
97 | 101 | -b |
|
98 | 102 | +b b |
|
99 | 103 | c |
|
100 | 104 | d |
|
101 | 105 | e |
|
102 |
record change 4/6 to '2.txt'? [Ynsfdaq?] |
|
|
106 | record change 4/6 to '2.txt'? [Ynsfdaq?] | |
|
107 | diff --git a/dir/a.txt b/dir/a.txt | |
|
103 | 108 | 1 hunks, 2 lines changed |
|
104 | 109 | examine changes to 'dir/a.txt'? [Ynsfdaq?] |
|
110 | ||
|
105 | 111 | % after qrecord a.patch 'tip' |
|
106 | 112 | changeset: 1:5d1ca63427ee |
|
107 | 113 | tag: qtip |
|
108 | 114 | tag: tip |
|
109 | 115 | tag: a.patch |
|
110 | 116 | tag: qbase |
|
111 | 117 | user: test |
|
112 | 118 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
113 | 119 | summary: aaa |
|
114 | 120 | |
|
115 | 121 | diff -r 1057167b20ef -r 5d1ca63427ee 1.txt |
|
116 | 122 | --- a/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
117 | 123 | +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
118 | 124 | @@ -1,5 +1,5 @@ |
|
119 | 125 | 1 |
|
120 | 126 | -2 |
|
121 | 127 | +2 2 |
|
122 | 128 | 3 |
|
123 | 129 | 4 |
|
124 | 130 | 5 |
|
125 | 131 | diff -r 1057167b20ef -r 5d1ca63427ee 2.txt |
|
126 | 132 | --- a/2.txt Thu Jan 01 00:00:00 1970 +0000 |
|
127 | 133 | +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 134 | @@ -1,5 +1,5 @@ |
|
129 | 135 | a |
|
130 | 136 | -b |
|
131 | 137 | +b b |
|
132 | 138 | c |
|
133 | 139 | d |
|
134 | 140 | e |
|
135 | 141 | |
|
136 | 142 | |
|
137 | 143 | % after qrecord a.patch 'diff' |
|
138 | 144 | diff -r 5d1ca63427ee 1.txt |
|
139 | 145 | --- a/1.txt |
|
140 | 146 | +++ b/1.txt |
|
141 | 147 | @@ -1,5 +1,5 @@ |
|
142 | 148 | 1 |
|
143 | 149 | 2 2 |
|
144 | 150 | 3 |
|
145 | 151 | -4 |
|
146 | 152 | +4 4 |
|
147 | 153 | 5 |
|
148 | 154 | diff -r 5d1ca63427ee dir/a.txt |
|
149 | 155 | --- a/dir/a.txt |
|
150 | 156 | +++ b/dir/a.txt |
|
151 | 157 | @@ -1,4 +1,4 @@ |
|
152 | 158 | -hello world |
|
153 | 159 | +hello world! |
|
154 | 160 | |
|
155 | 161 | someone |
|
156 | 162 | up |
|
157 | 163 | % qrecord b.patch |
|
158 | 164 | diff --git a/1.txt b/1.txt |
|
159 | 165 | 1 hunks, 2 lines changed |
|
160 |
examine changes to '1.txt'? [Ynsfdaq?] |
|
|
166 | examine changes to '1.txt'? [Ynsfdaq?] | |
|
167 | @@ -1,5 +1,5 @@ | |
|
161 | 168 | 1 |
|
162 | 169 | 2 2 |
|
163 | 170 | 3 |
|
164 | 171 | -4 |
|
165 | 172 | +4 4 |
|
166 | 173 | 5 |
|
167 |
record change 1/3 to '1.txt'? [Ynsfdaq?] |
|
|
174 | record change 1/3 to '1.txt'? [Ynsfdaq?] | |
|
175 | diff --git a/dir/a.txt b/dir/a.txt | |
|
168 | 176 | 1 hunks, 2 lines changed |
|
169 |
examine changes to 'dir/a.txt'? [Ynsfdaq?] |
|
|
177 | examine changes to 'dir/a.txt'? [Ynsfdaq?] | |
|
178 | @@ -1,4 +1,4 @@ | |
|
170 | 179 | -hello world |
|
171 | 180 | +hello world! |
|
172 | 181 | |
|
173 | 182 | someone |
|
174 | 183 | up |
|
175 | 184 | record change 3/3 to 'dir/a.txt'? [Ynsfdaq?] |
|
185 | ||
|
176 | 186 | % after qrecord b.patch 'tip' |
|
177 | 187 | changeset: 2:b056198bf878 |
|
178 | 188 | tag: qtip |
|
179 | 189 | tag: tip |
|
180 | 190 | tag: b.patch |
|
181 | 191 | user: test |
|
182 | 192 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
183 | 193 | summary: bbb |
|
184 | 194 | |
|
185 | 195 | diff -r 5d1ca63427ee -r b056198bf878 1.txt |
|
186 | 196 | --- a/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
187 | 197 | +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
188 | 198 | @@ -1,5 +1,5 @@ |
|
189 | 199 | 1 |
|
190 | 200 | 2 2 |
|
191 | 201 | 3 |
|
192 | 202 | -4 |
|
193 | 203 | +4 4 |
|
194 | 204 | 5 |
|
195 | 205 | diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt |
|
196 | 206 | --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000 |
|
197 | 207 | +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000 |
|
198 | 208 | @@ -1,4 +1,4 @@ |
|
199 | 209 | -hello world |
|
200 | 210 | +hello world! |
|
201 | 211 | |
|
202 | 212 | someone |
|
203 | 213 | up |
|
204 | 214 | |
|
205 | 215 | |
|
206 | 216 | % after qrecord b.patch 'diff' |
|
207 | 217 | |
|
208 | 218 | % --- end --- |
@@ -1,595 +1,647 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" will be |
|
7 | 7 | candidates for recording. |
|
8 | 8 | |
|
9 | 9 | See 'hg help dates' for a list of formats valid for -d/--date. |
|
10 | 10 | |
|
11 | 11 | You will be prompted for whether to record changes to each modified file, |
|
12 | 12 | and for files with multiple changes, for each change to use. For each |
|
13 | 13 | query, the following responses are possible: |
|
14 | 14 | |
|
15 | 15 | y - record this change |
|
16 | 16 | n - skip this change |
|
17 | 17 | |
|
18 | 18 | s - skip remaining changes to this file |
|
19 | 19 | f - record remaining changes to this file |
|
20 | 20 | |
|
21 | 21 | d - done, skip remaining changes and files |
|
22 | 22 | a - record all changes to all remaining files |
|
23 | 23 | q - quit, recording no changes |
|
24 | 24 | |
|
25 | 25 | ? - display help |
|
26 | 26 | |
|
27 | 27 | options: |
|
28 | 28 | |
|
29 | 29 | -A --addremove mark new/missing files as added/removed before committing |
|
30 | 30 | --close-branch mark a branch as closed, hiding it from the branch list |
|
31 | 31 | -I --include include names matching the given patterns |
|
32 | 32 | -X --exclude exclude names matching the given patterns |
|
33 | 33 | -m --message use <text> as commit message |
|
34 | 34 | -l --logfile read commit message from <file> |
|
35 | 35 | -d --date record datecode as commit date |
|
36 | 36 | -u --user record the specified user as committer |
|
37 | 37 | |
|
38 | 38 | use "hg -v help record" to show global options |
|
39 | 39 | % select no files |
|
40 | 40 | diff --git a/empty-rw b/empty-rw |
|
41 | 41 | new file mode 100644 |
|
42 |
examine changes to 'empty-rw'? [Ynsfdaq?] |
|
|
42 | examine changes to 'empty-rw'? [Ynsfdaq?] | |
|
43 | no changes to record | |
|
43 | 44 | |
|
44 | 45 | changeset: -1:000000000000 |
|
45 | 46 | tag: tip |
|
46 | 47 | user: |
|
47 | 48 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
48 | 49 | |
|
49 | 50 | |
|
50 | 51 | % select files but no hunks |
|
51 | 52 | diff --git a/empty-rw b/empty-rw |
|
52 | 53 | new file mode 100644 |
|
53 |
examine changes to 'empty-rw'? [Ynsfdaq?] |
|
|
54 | examine changes to 'empty-rw'? [Ynsfdaq?] | |
|
55 | abort: empty commit message | |
|
54 | 56 | |
|
55 | 57 | changeset: -1:000000000000 |
|
56 | 58 | tag: tip |
|
57 | 59 | user: |
|
58 | 60 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
59 | 61 | |
|
60 | 62 | |
|
61 | 63 | % record empty file |
|
62 | 64 | diff --git a/empty-rw b/empty-rw |
|
63 | 65 | new file mode 100644 |
|
64 | 66 | examine changes to 'empty-rw'? [Ynsfdaq?] |
|
67 | ||
|
65 | 68 | changeset: 0:c0708cf4e46e |
|
66 | 69 | tag: tip |
|
67 | 70 | user: test |
|
68 | 71 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
69 | 72 | summary: empty |
|
70 | 73 | |
|
71 | 74 | |
|
72 | 75 | % rename empty file |
|
73 | 76 | diff --git a/empty-rw b/empty-rename |
|
74 | 77 | rename from empty-rw |
|
75 | 78 | rename to empty-rename |
|
76 | 79 | examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?] |
|
80 | ||
|
77 | 81 | changeset: 1:d695e8dcb197 |
|
78 | 82 | tag: tip |
|
79 | 83 | user: test |
|
80 | 84 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
81 | 85 | summary: rename |
|
82 | 86 | |
|
83 | 87 | |
|
84 | 88 | % copy empty file |
|
85 | 89 | diff --git a/empty-rename b/empty-copy |
|
86 | 90 | copy from empty-rename |
|
87 | 91 | copy to empty-copy |
|
88 | 92 | examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?] |
|
93 | ||
|
89 | 94 | changeset: 2:1d4b90bea524 |
|
90 | 95 | tag: tip |
|
91 | 96 | user: test |
|
92 | 97 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
93 | 98 | summary: copy |
|
94 | 99 | |
|
95 | 100 | |
|
96 | 101 | % delete empty file |
|
97 | 102 | diff --git a/empty-copy b/empty-copy |
|
98 | 103 | deleted file mode 100644 |
|
99 | 104 | examine changes to 'empty-copy'? [Ynsfdaq?] |
|
105 | ||
|
100 | 106 | changeset: 3:b39a238f01a1 |
|
101 | 107 | tag: tip |
|
102 | 108 | user: test |
|
103 | 109 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
104 | 110 | summary: delete |
|
105 | 111 | |
|
106 | 112 | |
|
107 | 113 | % add binary file |
|
108 | 114 | 1 changesets found |
|
109 | 115 | diff --git a/tip.bundle b/tip.bundle |
|
110 | 116 | new file mode 100644 |
|
111 | 117 | this is a binary file |
|
112 | 118 | examine changes to 'tip.bundle'? [Ynsfdaq?] |
|
119 | ||
|
113 | 120 | changeset: 4:ad816da3711e |
|
114 | 121 | tag: tip |
|
115 | 122 | user: test |
|
116 | 123 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
117 | 124 | summary: binary |
|
118 | 125 | |
|
119 | 126 | diff -r b39a238f01a1 -r ad816da3711e tip.bundle |
|
120 | 127 | Binary file tip.bundle has changed |
|
121 | 128 | |
|
122 | 129 | % change binary file |
|
123 | 130 | 1 changesets found |
|
124 | 131 | diff --git a/tip.bundle b/tip.bundle |
|
125 | 132 | this modifies a binary file (all or nothing) |
|
126 | 133 | examine changes to 'tip.bundle'? [Ynsfdaq?] |
|
134 | ||
|
127 | 135 | changeset: 5:dccd6f3eb485 |
|
128 | 136 | tag: tip |
|
129 | 137 | user: test |
|
130 | 138 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
131 | 139 | summary: binary-change |
|
132 | 140 | |
|
133 | 141 | diff -r ad816da3711e -r dccd6f3eb485 tip.bundle |
|
134 | 142 | Binary file tip.bundle has changed |
|
135 | 143 | |
|
136 | 144 | % rename and change binary file |
|
137 | 145 | 1 changesets found |
|
138 | 146 | diff --git a/tip.bundle b/top.bundle |
|
139 | 147 | rename from tip.bundle |
|
140 | 148 | rename to top.bundle |
|
141 | 149 | this modifies a binary file (all or nothing) |
|
142 | 150 | examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?] |
|
151 | ||
|
143 | 152 | changeset: 6:7fa44105f5b3 |
|
144 | 153 | tag: tip |
|
145 | 154 | user: test |
|
146 | 155 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
147 | 156 | summary: binary-change-rename |
|
148 | 157 | |
|
149 | 158 | diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle |
|
150 | 159 | Binary file tip.bundle has changed |
|
151 | 160 | diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle |
|
152 | 161 | Binary file top.bundle has changed |
|
153 | 162 | |
|
154 | 163 | % add plain file |
|
155 | 164 | diff --git a/plain b/plain |
|
156 | 165 | new file mode 100644 |
|
157 | 166 | examine changes to 'plain'? [Ynsfdaq?] |
|
167 | ||
|
158 | 168 | changeset: 7:11fb457c1be4 |
|
159 | 169 | tag: tip |
|
160 | 170 | user: test |
|
161 | 171 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
162 | 172 | summary: plain |
|
163 | 173 | |
|
164 | 174 | diff -r 7fa44105f5b3 -r 11fb457c1be4 plain |
|
165 | 175 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
166 | 176 | +++ b/plain Thu Jan 01 00:00:07 1970 +0000 |
|
167 | 177 | @@ -0,0 +1,10 @@ |
|
168 | 178 | +1 |
|
169 | 179 | +2 |
|
170 | 180 | +3 |
|
171 | 181 | +4 |
|
172 | 182 | +5 |
|
173 | 183 | +6 |
|
174 | 184 | +7 |
|
175 | 185 | +8 |
|
176 | 186 | +9 |
|
177 | 187 | +10 |
|
178 | 188 | |
|
179 | 189 | % modify end of plain file |
|
180 | 190 | diff --git a/plain b/plain |
|
181 | 191 | 1 hunks, 1 lines changed |
|
182 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
192 | examine changes to 'plain'? [Ynsfdaq?] | |
|
193 | @@ -8,3 +8,4 @@ | |
|
183 | 194 | 8 |
|
184 | 195 | 9 |
|
185 | 196 | 10 |
|
186 | 197 | +11 |
|
187 |
record this change to 'plain'? [Ynsfdaq?] |
|
|
198 | record this change to 'plain'? [Ynsfdaq?] | |
|
199 | % modify end of plain file, no EOL | |
|
188 | 200 | diff --git a/plain b/plain |
|
189 | 201 | 1 hunks, 1 lines changed |
|
190 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
202 | examine changes to 'plain'? [Ynsfdaq?] | |
|
203 | @@ -9,3 +9,4 @@ | |
|
191 | 204 | 9 |
|
192 | 205 | 10 |
|
193 | 206 | 11 |
|
194 | 207 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
195 | 208 | \ No newline at end of file |
|
196 |
record this change to 'plain'? [Ynsfdaq?] |
|
|
209 | record this change to 'plain'? [Ynsfdaq?] | |
|
210 | % modify end of plain file, add EOL | |
|
197 | 211 | diff --git a/plain b/plain |
|
198 | 212 | 1 hunks, 2 lines changed |
|
199 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
213 | examine changes to 'plain'? [Ynsfdaq?] | |
|
214 | @@ -9,4 +9,4 @@ | |
|
200 | 215 | 9 |
|
201 | 216 | 10 |
|
202 | 217 | 11 |
|
203 | 218 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
204 | 219 | \ No newline at end of file |
|
205 | 220 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
206 |
record this change to 'plain'? [Ynsfdaq?] |
|
|
221 | record this change to 'plain'? [Ynsfdaq?] | |
|
222 | % modify beginning, trim end, record both | |
|
207 | 223 | diff --git a/plain b/plain |
|
208 | 224 | 2 hunks, 4 lines changed |
|
209 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
225 | examine changes to 'plain'? [Ynsfdaq?] | |
|
226 | @@ -1,4 +1,4 @@ | |
|
210 | 227 | -1 |
|
211 | 228 | +2 |
|
212 | 229 | 2 |
|
213 | 230 | 3 |
|
214 | 231 | 4 |
|
215 |
record change 1/2 to 'plain'? [Ynsfdaq?] |
|
|
232 | record change 1/2 to 'plain'? [Ynsfdaq?] | |
|
233 | @@ -8,5 +8,3 @@ | |
|
216 | 234 | 8 |
|
217 | 235 | 9 |
|
218 | 236 | 10 |
|
219 | 237 | -11 |
|
220 | 238 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
221 | 239 | record change 2/2 to 'plain'? [Ynsfdaq?] |
|
240 | ||
|
222 | 241 | changeset: 11:efca65c9b09e |
|
223 | 242 | tag: tip |
|
224 | 243 | user: test |
|
225 | 244 | date: Thu Jan 01 00:00:10 1970 +0000 |
|
226 | 245 | summary: begin-and-end |
|
227 | 246 | |
|
228 | 247 | diff -r cd07d48e8cbe -r efca65c9b09e plain |
|
229 | 248 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
230 | 249 | +++ b/plain Thu Jan 01 00:00:10 1970 +0000 |
|
231 | 250 | @@ -1,4 +1,4 @@ |
|
232 | 251 | -1 |
|
233 | 252 | +2 |
|
234 | 253 | 2 |
|
235 | 254 | 3 |
|
236 | 255 | 4 |
|
237 | 256 | @@ -8,5 +8,3 @@ |
|
238 | 257 | 8 |
|
239 | 258 | 9 |
|
240 | 259 | 10 |
|
241 | 260 | -11 |
|
242 | 261 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
243 | 262 | |
|
244 | 263 | % trim beginning, modify end |
|
245 | 264 | % record end |
|
246 | 265 | diff --git a/plain b/plain |
|
247 | 266 | 2 hunks, 5 lines changed |
|
248 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
267 | examine changes to 'plain'? [Ynsfdaq?] | |
|
268 | @@ -1,9 +1,6 @@ | |
|
249 | 269 | -2 |
|
250 | 270 | -2 |
|
251 | 271 | -3 |
|
252 | 272 | 4 |
|
253 | 273 | 5 |
|
254 | 274 | 6 |
|
255 | 275 | 7 |
|
256 | 276 | 8 |
|
257 | 277 | 9 |
|
258 |
record change 1/2 to 'plain'? [Ynsfdaq?] |
|
|
278 | record change 1/2 to 'plain'? [Ynsfdaq?] | |
|
279 | @@ -4,7 +1,7 @@ | |
|
259 | 280 | 4 |
|
260 | 281 | 5 |
|
261 | 282 | 6 |
|
262 | 283 | 7 |
|
263 | 284 | 8 |
|
264 | 285 | 9 |
|
265 | 286 | -10 |
|
266 | 287 | +10.new |
|
267 | 288 | record change 2/2 to 'plain'? [Ynsfdaq?] |
|
289 | ||
|
268 | 290 | changeset: 12:7d1e66983c15 |
|
269 | 291 | tag: tip |
|
270 | 292 | user: test |
|
271 | 293 | date: Thu Jan 01 00:00:11 1970 +0000 |
|
272 | 294 | summary: end-only |
|
273 | 295 | |
|
274 | 296 | diff -r efca65c9b09e -r 7d1e66983c15 plain |
|
275 | 297 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
276 | 298 | +++ b/plain Thu Jan 01 00:00:11 1970 +0000 |
|
277 | 299 | @@ -7,4 +7,4 @@ |
|
278 | 300 | 7 |
|
279 | 301 | 8 |
|
280 | 302 | 9 |
|
281 | 303 | -10 |
|
282 | 304 | +10.new |
|
283 | 305 | |
|
284 | 306 | % record beginning |
|
285 | 307 | diff --git a/plain b/plain |
|
286 | 308 | 1 hunks, 3 lines changed |
|
287 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
309 | examine changes to 'plain'? [Ynsfdaq?] | |
|
310 | @@ -1,6 +1,3 @@ | |
|
288 | 311 | -2 |
|
289 | 312 | -2 |
|
290 | 313 | -3 |
|
291 | 314 | 4 |
|
292 | 315 | 5 |
|
293 | 316 | 6 |
|
294 | 317 | record this change to 'plain'? [Ynsfdaq?] |
|
318 | ||
|
295 | 319 | changeset: 13:a09fc62a0e61 |
|
296 | 320 | tag: tip |
|
297 | 321 | user: test |
|
298 | 322 | date: Thu Jan 01 00:00:12 1970 +0000 |
|
299 | 323 | summary: begin-only |
|
300 | 324 | |
|
301 | 325 | diff -r 7d1e66983c15 -r a09fc62a0e61 plain |
|
302 | 326 | --- a/plain Thu Jan 01 00:00:11 1970 +0000 |
|
303 | 327 | +++ b/plain Thu Jan 01 00:00:12 1970 +0000 |
|
304 | 328 | @@ -1,6 +1,3 @@ |
|
305 | 329 | -2 |
|
306 | 330 | -2 |
|
307 | 331 | -3 |
|
308 | 332 | 4 |
|
309 | 333 | 5 |
|
310 | 334 | 6 |
|
311 | 335 | |
|
312 | 336 | % add to beginning, trim from end |
|
313 | 337 | % record end |
|
314 | 338 | diff --git a/plain b/plain |
|
315 | 339 | 2 hunks, 4 lines changed |
|
316 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
340 | examine changes to 'plain'? [Ynsfdaq?] | |
|
341 | @@ -1,6 +1,9 @@ | |
|
317 | 342 | +1 |
|
318 | 343 | +2 |
|
319 | 344 | +3 |
|
320 | 345 | 4 |
|
321 | 346 | 5 |
|
322 | 347 | 6 |
|
323 | 348 | 7 |
|
324 | 349 | 8 |
|
325 | 350 | 9 |
|
326 |
record change 1/2 to 'plain'? [Ynsfdaq?] |
|
|
351 | record change 1/2 to 'plain'? [Ynsfdaq?] | |
|
352 | @@ -1,7 +4,6 @@ | |
|
327 | 353 | 4 |
|
328 | 354 | 5 |
|
329 | 355 | 6 |
|
330 | 356 | 7 |
|
331 | 357 | 8 |
|
332 | 358 | 9 |
|
333 | 359 | -10.new |
|
334 |
record change 2/2 to 'plain'? [Ynsfdaq?] |
|
|
360 | record change 2/2 to 'plain'? [Ynsfdaq?] | |
|
361 | % add to beginning, middle, end | |
|
335 | 362 | % record beginning, middle |
|
336 | 363 | diff --git a/plain b/plain |
|
337 | 364 | 3 hunks, 7 lines changed |
|
338 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
365 | examine changes to 'plain'? [Ynsfdaq?] | |
|
366 | @@ -1,2 +1,5 @@ | |
|
339 | 367 | +1 |
|
340 | 368 | +2 |
|
341 | 369 | +3 |
|
342 | 370 | 4 |
|
343 | 371 | 5 |
|
344 |
record change 1/3 to 'plain'? [Ynsfdaq?] |
|
|
372 | record change 1/3 to 'plain'? [Ynsfdaq?] | |
|
373 | @@ -1,6 +4,8 @@ | |
|
345 | 374 | 4 |
|
346 | 375 | 5 |
|
347 | 376 | +5.new |
|
348 | 377 | +5.reallynew |
|
349 | 378 | 6 |
|
350 | 379 | 7 |
|
351 | 380 | 8 |
|
352 | 381 | 9 |
|
353 |
record change 2/3 to 'plain'? [Ynsfdaq?] |
|
|
382 | record change 2/3 to 'plain'? [Ynsfdaq?] | |
|
383 | @@ -3,4 +8,6 @@ | |
|
354 | 384 | 6 |
|
355 | 385 | 7 |
|
356 | 386 | 8 |
|
357 | 387 | 9 |
|
358 | 388 | +10 |
|
359 | 389 | +11 |
|
360 | 390 | record change 3/3 to 'plain'? [Ynsfdaq?] |
|
391 | ||
|
361 | 392 | changeset: 15:7d137997f3a6 |
|
362 | 393 | tag: tip |
|
363 | 394 | user: test |
|
364 | 395 | date: Thu Jan 01 00:00:14 1970 +0000 |
|
365 | 396 | summary: middle-only |
|
366 | 397 | |
|
367 | 398 | diff -r c0b8e5fb0be6 -r 7d137997f3a6 plain |
|
368 | 399 | --- a/plain Thu Jan 01 00:00:13 1970 +0000 |
|
369 | 400 | +++ b/plain Thu Jan 01 00:00:14 1970 +0000 |
|
370 | 401 | @@ -1,5 +1,10 @@ |
|
371 | 402 | +1 |
|
372 | 403 | +2 |
|
373 | 404 | +3 |
|
374 | 405 | 4 |
|
375 | 406 | 5 |
|
376 | 407 | +5.new |
|
377 | 408 | +5.reallynew |
|
378 | 409 | 6 |
|
379 | 410 | 7 |
|
380 | 411 | 8 |
|
381 | 412 | |
|
382 | 413 | % record end |
|
383 | 414 | diff --git a/plain b/plain |
|
384 | 415 | 1 hunks, 2 lines changed |
|
385 |
examine changes to 'plain'? [Ynsfdaq?] |
|
|
416 | examine changes to 'plain'? [Ynsfdaq?] | |
|
417 | @@ -9,3 +9,5 @@ | |
|
386 | 418 | 7 |
|
387 | 419 | 8 |
|
388 | 420 | 9 |
|
389 | 421 | +10 |
|
390 | 422 | +11 |
|
391 | 423 | record this change to 'plain'? [Ynsfdaq?] |
|
424 | ||
|
392 | 425 | changeset: 16:4959e3ff13eb |
|
393 | 426 | tag: tip |
|
394 | 427 | user: test |
|
395 | 428 | date: Thu Jan 01 00:00:15 1970 +0000 |
|
396 | 429 | summary: end-only |
|
397 | 430 | |
|
398 | 431 | diff -r 7d137997f3a6 -r 4959e3ff13eb plain |
|
399 | 432 | --- a/plain Thu Jan 01 00:00:14 1970 +0000 |
|
400 | 433 | +++ b/plain Thu Jan 01 00:00:15 1970 +0000 |
|
401 | 434 | @@ -9,3 +9,5 @@ |
|
402 | 435 | 7 |
|
403 | 436 | 8 |
|
404 | 437 | 9 |
|
405 | 438 | +10 |
|
406 | 439 | +11 |
|
407 | 440 | |
|
408 | 441 | adding subdir/a |
|
409 | 442 | diff --git a/subdir/a b/subdir/a |
|
410 | 443 | 1 hunks, 1 lines changed |
|
411 |
examine changes to 'subdir/a'? [Ynsfdaq?] |
|
|
444 | examine changes to 'subdir/a'? [Ynsfdaq?] | |
|
445 | @@ -1,1 +1,2 @@ | |
|
412 | 446 | a |
|
413 | 447 | +a |
|
414 | 448 | record this change to 'subdir/a'? [Ynsfdaq?] |
|
449 | ||
|
415 | 450 | changeset: 18:40698cd490b2 |
|
416 | 451 | tag: tip |
|
417 | 452 | user: test |
|
418 | 453 | date: Thu Jan 01 00:00:16 1970 +0000 |
|
419 | 454 | summary: subdir-change |
|
420 | 455 | |
|
421 | 456 | diff -r 661eacdc08b9 -r 40698cd490b2 subdir/a |
|
422 | 457 | --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
423 | 458 | +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
424 | 459 | @@ -1,1 +1,2 @@ |
|
425 | 460 | a |
|
426 | 461 | +a |
|
427 | 462 | |
|
428 | 463 | % help, quit |
|
429 | 464 | diff --git a/subdir/f1 b/subdir/f1 |
|
430 | 465 | 1 hunks, 1 lines changed |
|
431 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
466 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
467 | y - record this change | |
|
432 | 468 | n - skip this change |
|
433 | 469 | s - skip remaining changes to this file |
|
434 | 470 | f - record remaining changes to this file |
|
435 | 471 | d - done, skip remaining changes and files |
|
436 | 472 | a - record all changes to all remaining files |
|
437 | 473 | q - quit, recording no changes |
|
438 | 474 | ? - display help |
|
439 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
475 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
476 | abort: user quit | |
|
440 | 477 | % skip |
|
441 | 478 | diff --git a/subdir/f1 b/subdir/f1 |
|
442 | 479 | 1 hunks, 1 lines changed |
|
443 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
480 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
481 | diff --git a/subdir/f2 b/subdir/f2 | |
|
444 | 482 | 1 hunks, 1 lines changed |
|
445 | 483 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected |
|
446 | 484 | % no |
|
447 | 485 | diff --git a/subdir/f1 b/subdir/f1 |
|
448 | 486 | 1 hunks, 1 lines changed |
|
449 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
487 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
488 | diff --git a/subdir/f2 b/subdir/f2 | |
|
450 | 489 | 1 hunks, 1 lines changed |
|
451 | 490 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected |
|
452 | 491 | % f, quit |
|
453 | 492 | diff --git a/subdir/f1 b/subdir/f1 |
|
454 | 493 | 1 hunks, 1 lines changed |
|
455 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
494 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
495 | diff --git a/subdir/f2 b/subdir/f2 | |
|
456 | 496 | 1 hunks, 1 lines changed |
|
457 |
examine changes to 'subdir/f2'? [Ynsfdaq?] |
|
|
497 | examine changes to 'subdir/f2'? [Ynsfdaq?] | |
|
498 | abort: user quit | |
|
458 | 499 | % s, all |
|
459 | 500 | diff --git a/subdir/f1 b/subdir/f1 |
|
460 | 501 | 1 hunks, 1 lines changed |
|
461 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
502 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
503 | diff --git a/subdir/f2 b/subdir/f2 | |
|
462 | 504 | 1 hunks, 1 lines changed |
|
463 | 505 | examine changes to 'subdir/f2'? [Ynsfdaq?] |
|
506 | ||
|
464 | 507 | changeset: 20:d2d8c25276a8 |
|
465 | 508 | tag: tip |
|
466 | 509 | user: test |
|
467 | 510 | date: Thu Jan 01 00:00:18 1970 +0000 |
|
468 | 511 | summary: x |
|
469 | 512 | |
|
470 | 513 | diff -r 25eb2a7694fb -r d2d8c25276a8 subdir/f2 |
|
471 | 514 | --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000 |
|
472 | 515 | +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000 |
|
473 | 516 | @@ -1,1 +1,2 @@ |
|
474 | 517 | b |
|
475 | 518 | +b |
|
476 | 519 | |
|
477 | 520 | % f |
|
478 | 521 | diff --git a/subdir/f1 b/subdir/f1 |
|
479 | 522 | 1 hunks, 1 lines changed |
|
480 | 523 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
524 | ||
|
481 | 525 | changeset: 21:1013f51ce32f |
|
482 | 526 | tag: tip |
|
483 | 527 | user: test |
|
484 | 528 | date: Thu Jan 01 00:00:19 1970 +0000 |
|
485 | 529 | summary: y |
|
486 | 530 | |
|
487 | 531 | diff -r d2d8c25276a8 -r 1013f51ce32f subdir/f1 |
|
488 | 532 | --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000 |
|
489 | 533 | +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000 |
|
490 | 534 | @@ -1,1 +1,2 @@ |
|
491 | 535 | a |
|
492 | 536 | +a |
|
493 | 537 | |
|
494 | 538 | % preserve chmod +x |
|
495 | 539 | diff --git a/subdir/f1 b/subdir/f1 |
|
496 | 540 | old mode 100644 |
|
497 | 541 | new mode 100755 |
|
498 | 542 | 1 hunks, 1 lines changed |
|
499 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
543 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
544 | @@ -1,2 +1,3 @@ | |
|
500 | 545 | a |
|
501 | 546 | a |
|
502 | 547 | +a |
|
503 | 548 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
549 | ||
|
504 | 550 | changeset: 22:5df857735621 |
|
505 | 551 | tag: tip |
|
506 | 552 | user: test |
|
507 | 553 | date: Thu Jan 01 00:00:20 1970 +0000 |
|
508 | 554 | summary: z |
|
509 | 555 | |
|
510 | 556 | diff --git a/subdir/f1 b/subdir/f1 |
|
511 | 557 | old mode 100644 |
|
512 | 558 | new mode 100755 |
|
513 | 559 | --- a/subdir/f1 |
|
514 | 560 | +++ b/subdir/f1 |
|
515 | 561 | @@ -1,2 +1,3 @@ |
|
516 | 562 | a |
|
517 | 563 | a |
|
518 | 564 | +a |
|
519 | 565 | |
|
520 | 566 | % preserve execute permission on original |
|
521 | 567 | diff --git a/subdir/f1 b/subdir/f1 |
|
522 | 568 | 1 hunks, 1 lines changed |
|
523 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
569 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
570 | @@ -1,3 +1,4 @@ | |
|
524 | 571 | a |
|
525 | 572 | a |
|
526 | 573 | a |
|
527 | 574 | +b |
|
528 | 575 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
576 | ||
|
529 | 577 | changeset: 23:a4ae36a78715 |
|
530 | 578 | tag: tip |
|
531 | 579 | user: test |
|
532 | 580 | date: Thu Jan 01 00:00:21 1970 +0000 |
|
533 | 581 | summary: aa |
|
534 | 582 | |
|
535 | 583 | diff --git a/subdir/f1 b/subdir/f1 |
|
536 | 584 | --- a/subdir/f1 |
|
537 | 585 | +++ b/subdir/f1 |
|
538 | 586 | @@ -1,3 +1,4 @@ |
|
539 | 587 | a |
|
540 | 588 | a |
|
541 | 589 | a |
|
542 | 590 | +b |
|
543 | 591 | |
|
544 | 592 | % preserve chmod -x |
|
545 | 593 | diff --git a/subdir/f1 b/subdir/f1 |
|
546 | 594 | old mode 100755 |
|
547 | 595 | new mode 100644 |
|
548 | 596 | 1 hunks, 1 lines changed |
|
549 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
597 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
598 | @@ -2,3 +2,4 @@ | |
|
550 | 599 | a |
|
551 | 600 | a |
|
552 | 601 | b |
|
553 | 602 | +c |
|
554 | 603 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
604 | ||
|
555 | 605 | changeset: 24:1460f6e47966 |
|
556 | 606 | tag: tip |
|
557 | 607 | user: test |
|
558 | 608 | date: Thu Jan 01 00:00:22 1970 +0000 |
|
559 | 609 | summary: ab |
|
560 | 610 | |
|
561 | 611 | diff --git a/subdir/f1 b/subdir/f1 |
|
562 | 612 | old mode 100755 |
|
563 | 613 | new mode 100644 |
|
564 | 614 | --- a/subdir/f1 |
|
565 | 615 | +++ b/subdir/f1 |
|
566 | 616 | @@ -2,3 +2,4 @@ |
|
567 | 617 | a |
|
568 | 618 | a |
|
569 | 619 | b |
|
570 | 620 | +c |
|
571 | 621 | |
|
572 | 622 | % with win32ext |
|
573 | 623 | diff --git a/subdir/f1 b/subdir/f1 |
|
574 | 624 | 1 hunks, 1 lines changed |
|
575 |
examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
|
625 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
|
626 | @@ -3,3 +3,4 @@ | |
|
576 | 627 | a |
|
577 | 628 | b |
|
578 | 629 | c |
|
579 | 630 | +d |
|
580 | 631 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
632 | ||
|
581 | 633 | changeset: 25:5bacc1f6e9cf |
|
582 | 634 | tag: tip |
|
583 | 635 | user: test |
|
584 | 636 | date: Thu Jan 01 00:00:23 1970 +0000 |
|
585 | 637 | summary: w1 |
|
586 | 638 | |
|
587 | 639 | diff -r 1460f6e47966 -r 5bacc1f6e9cf subdir/f1 |
|
588 | 640 | --- a/subdir/f1 Thu Jan 01 00:00:22 1970 +0000 |
|
589 | 641 | +++ b/subdir/f1 Thu Jan 01 00:00:23 1970 +0000 |
|
590 | 642 | @@ -3,3 +3,4 @@ |
|
591 | 643 | a |
|
592 | 644 | b |
|
593 | 645 | c |
|
594 | 646 | +d |
|
595 | 647 |
General Comments 0
You need to be logged in to leave comments.
Login now