Fossil

Check-in [6a5f0c5b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add test case to handle file add and rename before merging to trunk. Make test_setup return the repository path so it can be used in the test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6a5f0c5b557a70adeb555098a9c7cc212c81c948
User & Date: andybradford 2016-11-12 22:19:17
Context
2016-11-12
22:58
Move the revert in test case to the correct sequence to avoid a merge conflict. check-in: 3eeab4a5 user: andybradford tags: trunk
22:19
Add test case to handle file add and rename before merging to trunk. Make test_setup return the repository path so it can be used in the test. check-in: 6a5f0c5b user: andybradford tags: trunk
04:21
Make artifact|whatis page use local time to match the timeline. Otherwise clicking on date/time links finds the wrong check-in in the timeline. May wish to convert other calls to datetime() to use local time. check-in: e7192bb9 user: andygoth tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/merge_renames.test.

463
464
465
466
467
468
469































































470
471
472
473
474
475
476
477
478
479
480
481
test_file_contents merge_renames-12-4 f1v "f1v\np"
fossil commit -m "merge p"

fossil merge m
test_status_list merge_renames-12-5 $RESULT {MERGE f1v}
test_file_contents merge_renames-12-6 f1v "f1v\nm"
fossil commit -m "merge m"
































































######################################
#
# Tests for troubles not specifically linked with renames but that I'd like to
# write:
#  [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
#  [953031915f] - Lack of warning when overwriting extra files
#  [4df5f38f1e] - Troubles merging a file delete with a file change

###############################################################################

test_cleanup







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
test_file_contents merge_renames-12-4 f1v "f1v\np"
fossil commit -m "merge p"

fossil merge m
test_status_list merge_renames-12-5 $RESULT {MERGE f1v}
test_file_contents merge_renames-12-6 f1v "f1v\nm"
fossil commit -m "merge m"

#################################################################
#  Test 13                                                      #
#  Merge in add+rename that happened on a branch, then merged   # 
#  back to branch, and again to trunk, then merge in branch.    #
#################################################################

set repoDir [test_setup]
write_file f1 "line1"
fossil add f1
fossil commit -m "add f1" --tag c1

write_file f2 "line1"
fossil add f2
fossil commit -m "add f2 on branch" -b b --tag c2
fossil update trunk
test_status_list merge_renames_13-1 $RESULT {REMOVE f2}
write_file f1 "line1\nline2\n"
fossil commit -m "edit f1 on trunk" --tag c3

fossil update b
test_status_list merge_renames_13-2 $RESULT {
  UPDATE f1
  ADD f2
}
fossil merge trunk
fossil commit -m "merge trunk" --tag c4
fossil mv --hard f2 f2n
test_status_list merge_renames-13-3 $RESULT "
  RENAME f2 f2n
  MOVED_FILE $repoDir/f2
"
fossil commit -m "renamed f2->f2n" --tag c5

fossil update trunk
fossil merge b
test_status_list merge_renames-13-4 $RESULT {ADDED f2n}
fossil commit -m "merge f2n" --tag m1 --tag c6

fossil update b
write_file f1 "line1\nline3\nline2"
fossil commit -m "edit f1 on b" --tag c7

fossil update trunk
write_file f1 "line1\nline3\nline2\nline4"
fossil commit -m "edit f1 on trunk" --tag c8

fossil update b
fossil merge trunk
fossil commit -m "merge trunk" --tag c9
write_file f1 "line1\nline3\nline4"
fossil commit -m "edit f1 on b" --tag c10

fossil revert
fossil update m1
fossil merge b
test_status_list merge_renames-13-7 $RESULT {UPDATE f1}
test_file_contents merge_renames-13-8 f2n "line1"

fossil update trunk
fossil merge --integrate b
test_status_list merge_renames-13-5 $RESULT {UPDATE f1}
test_file_contents merge_renames-13-6 f2n "line1"

######################################
#
# Tests for troubles not specifically linked with renames but that I'd like to
# write:
#  [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
#  [953031915f] - Lack of warning when overwriting extra files
#  [4df5f38f1e] - Troubles merging a file delete with a file change

###############################################################################

test_cleanup

Changes to test/tester.tcl.

449
450
451
452
453
454
455

456
457
458
459
460
461
462
  }
  if {![info exists ::tempSavedPwd]} {set ::tempSavedPwd [pwd]}; cd $repoPath
  if {[string length $filename] > 0} {
    exec $::fossilexe new $filename
    exec $::fossilexe open $filename
    exec $::fossilexe set mtime-changes off
  }

}

# This procedure only returns non-zero if the Tcl integration feature was
# enabled at compile-time and is now enabled at runtime.
proc is_tcl_usable_by_fossil {} {
  fossil test-th-eval "hasfeature tcl"
  if {[normalize_result] ne "1"} {return 0}







>







449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
  }
  if {![info exists ::tempSavedPwd]} {set ::tempSavedPwd [pwd]}; cd $repoPath
  if {[string length $filename] > 0} {
    exec $::fossilexe new $filename
    exec $::fossilexe open $filename
    exec $::fossilexe set mtime-changes off
  }
  return $repoPath
}

# This procedure only returns non-zero if the Tcl integration feature was
# enabled at compile-time and is now enabled at runtime.
proc is_tcl_usable_by_fossil {} {
  fossil test-th-eval "hasfeature tcl"
  if {[normalize_result] ne "1"} {return 0}