Show More
@@ -396,18 +396,21 b' Test update-timestamp config option|' | |||
|
396 | 396 | |
|
397 | 397 | $ hg init $TESTTMP/repo5 |
|
398 | 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 | 406 | $ echo a>a |
|
400 | 407 | $ hg ci -Am 'commit 1' |
|
401 | 408 | adding a |
|
402 | #if obsstore-on | |
|
403 | 409 |
|
|
404 | 410 | When updatetimestamp is False |
|
405 | 411 | |
|
406 | 412 | $ hg amend --date '1997-1-1 0:1' |
|
407 | 413 | $ hg log --limit 1 |
|
408 | changeset: 1:036a159be19d | |
|
409 | tag: tip | |
|
410 | parent: -1:000000000000 | |
|
411 | 414 | user: test |
|
412 | 415 | date: Wed Jan 01 00:01:00 1997 +0000 |
|
413 | 416 | summary: commit 1 |
@@ -418,9 +421,6 b' When updatetimestamp is False' | |||
|
418 | 421 | nothing changed |
|
419 | 422 | [1] |
|
420 | 423 | $ hg log --limit 1 |
|
421 | changeset: 1:036a159be19d | |
|
422 | tag: tip | |
|
423 | parent: -1:000000000000 | |
|
424 | 424 | user: test |
|
425 | 425 | date: Wed Jan 01 00:01:00 1997 +0000 |
|
426 | 426 | summary: commit 1 |
@@ -428,65 +428,13 b' When updatetimestamp is False' | |||
|
428 | 428 | When update-timestamp is True and there is other change than the date |
|
429 | 429 | $ hg amend --user foobar --config rewrite.update-timestamp=True |
|
430 | 430 | $ hg log --limit 1 |
|
431 | changeset: 2:3ba48b892280 | |
|
432 | tag: tip | |
|
433 | parent: -1:000000000000 | |
|
434 | 431 | user: foobar |
|
435 | 432 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
436 | 433 | summary: commit 1 |
|
437 | 434 | |
|
438 | ||
|
439 | 435 | When date option is applicable and update-timestamp is True |
|
440 | 436 | $ hg amend --date '1998-1-1 0:1' --config rewrite.update-timestamp=True |
|
441 | 437 | $ hg log --limit 1 |
|
442 | changeset: 3:626aee031885 | |
|
443 | tag: tip | |
|
444 | parent: -1:000000000000 | |
|
445 | 438 | user: foobar |
|
446 | 439 | date: Thu Jan 01 00:01:00 1998 +0000 |
|
447 | 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