Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch merge_renames Excluding Merge-Ins
This is equivalent to a diff from 0b9371365d to 62f4a8a61c
2011-09-01
| ||
22:05 | Add in the merge_renames test script from the similarly named branch. check-in: fcd68266e0 user: drh tags: trunk | |
2011-08-31
| ||
20:34 | Adding a new test I wanted to write. I just saw this in my local copy, but I really forgot if I finished it or not. Closed-Leaf check-in: 62f4a8a61c user: viriketo tags: merge_renames | |
2011-08-30
| ||
17:39 | Display the last modification time of tickets using either localtime or UTC according to user preferences. check-in: 839f105098 user: drh tags: trunk | |
08:01 | Updating from trunk to keep up working in the branch with the most recent fossil code. check-in: 75aaf30aad user: viriketo tags: merge_renames | |
2011-08-29
| ||
13:35 | Remove unused variables from timeline.c. Like [b76ce3d5f1c329] but omits the change to th_tcl.c. check-in: 0b9371365d user: drh tags: trunk | |
13:24 | Update the built-in SQLite to the latest 3.7.8 alpha version. check-in: 35474aff2f user: drh tags: trunk | |
Added test/merge_renames.test.
1 +# 2 +# Tests for merging with renames 3 +# 4 +# 5 + 6 +catch {exec $::fossilexe info} res 7 +puts res=$res 8 +if {![regexp {not within an open checkout} $res]} { 9 + puts stderr "Cannot run this test within an open checkout" 10 + return 11 +} 12 + 13 +###################################### 14 +# Test 1 # 15 +# Reported: Ticket [554f44ee74e3d] # 16 +###################################### 17 + 18 +fossil new rep.fossil 19 +fossil open rep.fossil 20 + 21 +write_file f1 "line" 22 +fossil add f1 23 +fossil commit -m "c1" 24 +fossil tag add pivot current 25 + 26 +write_file f1 "line2" 27 +fossil commit -m "c2" 28 + 29 +write_file f1 "line3" 30 +fossil commit -m "c3" 31 + 32 +write_file f1 "line4" 33 +fossil commit -m "c4" 34 + 35 +write_file f1 "line5" 36 +fossil commit -m "c4" 37 + 38 +write_file f1 "line6" 39 +fossil commit -m "c4" 40 + 41 +fossil update pivot 42 +fossil mv f1 f2 43 +exec mv f1 f2 44 +fossil commit -b rename -m "c5" 45 + 46 +fossil merge trunk 47 +fossil commit -m "trunk merged" 48 + 49 +fossil update pivot 50 +write_file f3 "someline" 51 +fossil add f3 52 +fossil commit -b branch2 -m "newbranch" 53 + 54 +fossil merge trunk 55 +puts $RESULT 56 + 57 +set deletes 0 58 +foreach {status filename} $RESULT { 59 + if {$status=="DELETE"} { 60 + set deletes [expr $deletes + 1] 61 + } 62 +} 63 + 64 +if {$deletes!=0} { 65 + # failed 66 + protOut "Error, the merge should not delete any file" 67 + test merge_renames-1 0 68 +} else { 69 + test merge_renames-1 1 70 +} 71 + 72 +fossil close -f 73 +exec rm rep.fossil 74 + 75 +###################################### 76 +# Test 2 # 77 +# Reported: Ticket [74413366fe5067] # 78 +###################################### 79 + 80 +fossil new rep.fossil 81 +fossil open rep.fossil 82 + 83 +write_file f1 "line" 84 +fossil add f1 85 +fossil commit -m "base file" 86 +fossil tag add pivot current 87 + 88 +write_file f2 "line2" 89 +fossil add f2 90 +fossil commit -m "newfile" 91 + 92 +fossil mv f2 f2new 93 +exec mv f2 f2new 94 +fossil commit -m "rename" 95 + 96 +fossil update pivot 97 +write_file f1 "line3" 98 +fossil commit -b branch -m "change" 99 + 100 +fossil merge trunk 101 +fossil commit -m "trunk merged" 102 + 103 +fossil update trunk 104 + 105 +fossil merge branch 106 +puts $RESULT 107 + 108 +# Not a nice way to check, but I don't know more tcl now 109 +set deletes 0 110 +foreach {status filename} $RESULT { 111 + if {$status=="DELETE"} { 112 + set deletes [expr $deletes + 1] 113 + } 114 +} 115 + 116 +if {$deletes!=0} { 117 + # failed 118 + protOut "Error, the merge should not delete any file" 119 + test merge_renames-2 0 120 +} else { 121 + test merge_renames-2 1 122 +} 123 + 124 +fossil close -f 125 +exec rm rep.fossil 126 + 127 +###################################### 128 +# Test 3 # 129 +# Reported: Ticket [30b28cf351] # 130 +###################################### 131 + 132 +fossil new rep.fossil 133 +fossil open rep.fossil 134 + 135 +write_file f1 "line" 136 +fossil add f1 137 +fossil commit -m "base file" 138 +fossil tag add pivot current 139 + 140 +write_file f2 "line2" 141 +fossil add f2 142 +fossil commit -m "newfile" 143 + 144 +fossil mv f2 f2new 145 +exec mv f2 f2new 146 +fossil commit -m "rename" 147 + 148 +fossil update pivot 149 +write_file f1 "line3" 150 +fossil commit -b branch -m "change" 151 + 152 +fossil merge trunk 153 +fossil commit -m "trunk merged" 154 + 155 +fossil update trunk 156 + 157 +fossil merge branch 158 +puts $RESULT 159 + 160 +# Not a nice way to check, but I don't know more tcl now 161 +set deletes 0 162 +foreach {status filename} $RESULT { 163 + if {$status=="DELETE"} { 164 + set deletes [expr $deletes + 1] 165 + } 166 +} 167 + 168 +if {$deletes!=0} { 169 + # failed 170 + protOut "Error, the merge should not delete any file" 171 + test merge_renames-2 0 172 +} else { 173 + test merge_renames-2 1 174 +} 175 + 176 +fossil close -f 177 +exec rm rep.fossil 178 + 179 +###################################### 180 +# Test 4 # 181 +# Reported: Ticket [67176c3aa4] # 182 +###################################### 183 + 184 +# TO BE WRITTEN. 185 + 186 + 187 +# Tests for troubles not specifically linked with renames but that I'd like to 188 +# write: 189 +# [c26c63eb1b] - 'merge --backout' does not handle conflicts properly 190 +# [953031915f] - Lack of warning when overwriting extra files 191 +# [4df5f38f1e] - Troubles merging a file delete with a file change