##// END OF EJS Templates
keyword: fix weeding of expansion candidates when recording...
Christian Ebert -
r12684:8348599c default
parent child Browse files
Show More
@@ -574,8 +574,9 b' def reposetup(ui, repo):'
574 ret = orig(ui, repo, commitfunc, *pats, **opts)
574 ret = orig(ui, repo, commitfunc, *pats, **opts)
575 recctx = repo['.']
575 recctx = repo['.']
576 if ctx != recctx:
576 if ctx != recctx:
577 modified = [f for f in modified if f in recctx]
577 changed = recctx.files()
578 added = [f for f in added if f in recctx]
578 modified = [f for f in modified if f in changed]
579 added = [f for f in added if f in changed]
579 kwt.restrict = False
580 kwt.restrict = False
580 kwt.overwrite(recctx, modified, False, True, kwt.re_kwexp.subn)
581 kwt.overwrite(recctx, modified, False, True, kwt.re_kwexp.subn)
581 kwt.overwrite(recctx, added, False, True, kwt.re_kw.subn)
582 kwt.overwrite(recctx, added, False, True, kwt.re_kw.subn)
@@ -291,11 +291,16 b' compare changenodes in a and c'
291 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
291 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
292 tests for different changenodes
292 tests for different changenodes
293
293
294 record
295
296 $ echo '$Id$' > r
297 $ hg add r
298
294 record chunk
299 record chunk
295
300
296 $ python -c \
301 $ python -c \
297 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
302 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
298 $ hg record -d '1 10' -m rectest<<EOF
303 $ hg record -d '1 10' -m rectest a<<EOF
299 > y
304 > y
300 > y
305 > y
301 > n
306 > n
@@ -319,6 +324,7 b' record chunk'
319 d17e03c92c97+ tip
324 d17e03c92c97+ tip
320 $ hg status
325 $ hg status
321 M a
326 M a
327 A r
322
328
323 Cat modified file a
329 Cat modified file a
324
330
@@ -331,7 +337,7 b' Cat modified file a'
331
337
332 Diff remaining chunk
338 Diff remaining chunk
333
339
334 $ hg diff
340 $ hg diff a
335 diff -r d17e03c92c97 a
341 diff -r d17e03c92c97 a
336 --- a/a Wed Dec 31 23:59:51 1969 -0000
342 --- a/a Wed Dec 31 23:59:51 1969 -0000
337 +++ b/a * (glob)
343 +++ b/a * (glob)
@@ -350,7 +356,7 b' Record all chunks in file a'
350
356
351 - do not use "hg record -m" here!
357 - do not use "hg record -m" here!
352
358
353 $ hg record -l msg -d '1 11'<<EOF
359 $ hg record -l msg -d '1 11' a<<EOF
354 > y
360 > y
355 > y
361 > y
356 > y
362 > y
@@ -415,13 +421,8 b' Only z should be overwritten'
415 $ hg forget y z
421 $ hg forget y z
416 $ rm y z
422 $ rm y z
417
423
418 $ hg update -C
424 record added file alone
419 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
420
425
421 record added file
422
423 $ echo '$Id$' > r
424 $ hg add r
425 $ hg -v record -l msg -d '1 12' r<<EOF
426 $ hg -v record -l msg -d '1 12' r<<EOF
426 > y
427 > y
427 > EOF
428 > EOF
@@ -436,6 +437,8 b' record added file'
436 overwriting r shrinking keywords
437 overwriting r shrinking keywords
437 $ hg forget r
438 $ hg forget r
438 $ rm msg r
439 $ rm msg r
440 $ hg update -C
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
439
442
440 Test patch queue repo
443 Test patch queue repo
441
444
General Comments 0
You need to be logged in to leave comments. Login now