Show More
@@ -396,97 +396,45 b' Test update-timestamp config option|' | |||||
396 |
|
396 | |||
397 | $ hg init $TESTTMP/repo5 |
|
397 | $ hg init $TESTTMP/repo5 | |
398 | $ cd $TESTTMP/repo5 |
|
398 | $ cd $TESTTMP/repo5 | |
|
399 | $ cat <<'EOF' >> .hg/hgrc | |||
|
400 | > [ui] | |||
|
401 | > logtemplate = 'user: {user} | |||
|
402 | > date: {date|date} | |||
|
403 | > summary: {desc|firstline}\n' | |||
|
404 | > EOF | |||
|
405 | ||||
399 | $ echo a>a |
|
406 | $ echo a>a | |
400 | $ hg ci -Am 'commit 1' |
|
407 | $ hg ci -Am 'commit 1' | |
401 | adding a |
|
408 | adding a | |
402 | #if obsstore-on |
|
|||
403 |
|
|
409 | ||
404 | When updatetimestamp is False |
|
410 | When updatetimestamp is False | |
405 |
|
411 | |||
406 | $ hg amend --date '1997-1-1 0:1' |
|
412 | $ hg amend --date '1997-1-1 0:1' | |
407 | $ hg log --limit 1 |
|
413 | $ hg log --limit 1 | |
408 | changeset: 1:036a159be19d |
|
|||
409 | tag: tip |
|
|||
410 | parent: -1:000000000000 |
|
|||
411 | user: test |
|
414 | user: test | |
412 | date: Wed Jan 01 00:01:00 1997 +0000 |
|
415 | date: Wed Jan 01 00:01:00 1997 +0000 | |
413 | summary: commit 1 |
|
416 | summary: commit 1 | |
414 |
|
417 | |||
415 | When update-timestamp is True and no other change than the date |
|
418 | When update-timestamp is True and no other change than the date | |
416 |
|
419 | |||
417 | $ hg amend --config rewrite.update-timestamp=True |
|
420 | $ hg amend --config rewrite.update-timestamp=True | |
418 | nothing changed |
|
421 | nothing changed | |
419 | [1] |
|
422 | [1] | |
420 | $ hg log --limit 1 |
|
423 | $ hg log --limit 1 | |
421 | changeset: 1:036a159be19d |
|
|||
422 | tag: tip |
|
|||
423 | parent: -1:000000000000 |
|
|||
424 | user: test |
|
424 | user: test | |
425 | date: Wed Jan 01 00:01:00 1997 +0000 |
|
425 | date: Wed Jan 01 00:01:00 1997 +0000 | |
426 | summary: commit 1 |
|
426 | summary: commit 1 | |
427 |
|
427 | |||
428 | When update-timestamp is True and there is other change than the date |
|
428 | When update-timestamp is True and there is other change than the date | |
429 | $ hg amend --user foobar --config rewrite.update-timestamp=True |
|
429 | $ hg amend --user foobar --config rewrite.update-timestamp=True | |
430 | $ hg log --limit 1 |
|
430 | $ hg log --limit 1 | |
431 | changeset: 2:3ba48b892280 |
|
|||
432 | tag: tip |
|
|||
433 | parent: -1:000000000000 |
|
|||
434 | user: foobar |
|
431 | user: foobar | |
435 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
432 | date: Thu Jan 01 00:00:02 1970 +0000 | |
436 | summary: commit 1 |
|
433 | summary: commit 1 | |
437 |
|
||||
438 |
|
434 | |||
439 | When date option is applicable and update-timestamp is True |
|
435 | When date option is applicable and update-timestamp is True | |
440 | $ hg amend --date '1998-1-1 0:1' --config rewrite.update-timestamp=True |
|
436 | $ hg amend --date '1998-1-1 0:1' --config rewrite.update-timestamp=True | |
441 | $ hg log --limit 1 |
|
437 | $ hg log --limit 1 | |
442 | changeset: 3:626aee031885 |
|
|||
443 | tag: tip |
|
|||
444 | parent: -1:000000000000 |
|
|||
445 | user: foobar |
|
438 | user: foobar | |
446 | date: Thu Jan 01 00:01:00 1998 +0000 |
|
439 | date: Thu Jan 01 00:01:00 1998 +0000 | |
447 | summary: commit 1 |
|
440 | summary: commit 1 | |
448 |
|
||||
449 | #else |
|
|||
450 |
|
||||
451 | When updatetimestamp is False |
|
|||
452 |
|
||||
453 | $ hg amend --date '1997-1-1 0:1' |
|
|||
454 | $ hg log --limit 1 |
|
|||
455 | changeset: 0:036a159be19d |
|
|||
456 | tag: tip |
|
|||
457 | user: test |
|
|||
458 | date: Wed Jan 01 00:01:00 1997 +0000 |
|
|||
459 | summary: commit 1 |
|
|||
460 |
|
||||
461 | When update-timestamp is True and no other change than the date |
|
|||
462 |
|
||||
463 | $ hg amend --config rewrite.update-timestamp=True |
|
|||
464 | nothing changed |
|
|||
465 | [1] |
|
|||
466 | $ hg log --limit 1 |
|
|||
467 | changeset: 0:036a159be19d |
|
|||
468 | tag: tip |
|
|||
469 | user: test |
|
|||
470 | date: Wed Jan 01 00:01:00 1997 +0000 |
|
|||
471 | summary: commit 1 |
|
|||
472 |
|
||||
473 | When update-timestamp is True and there is other change than the date |
|
|||
474 | $ hg amend --user foobar --config rewrite.update-timestamp=True |
|
|||
475 | $ hg log --limit 1 |
|
|||
476 | changeset: 0:3ba48b892280 |
|
|||
477 | tag: tip |
|
|||
478 | user: foobar |
|
|||
479 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
|||
480 | summary: commit 1 |
|
|||
481 |
|
||||
482 |
|
||||
483 | When date option is applicable and update-timestamp is True |
|
|||
484 | $ hg amend --date '1998-1-1 0:1' --config rewrite.update-timestamp=True |
|
|||
485 | $ hg log --limit 1 |
|
|||
486 | changeset: 0:626aee031885 |
|
|||
487 | tag: tip |
|
|||
488 | user: foobar |
|
|||
489 | date: Thu Jan 01 00:01:00 1998 +0000 |
|
|||
490 | summary: commit 1 |
|
|||
491 |
|
||||
492 | #endif |
|
General Comments 0
You need to be logged in to leave comments.
Login now