Fossil SCM
Fixed amend.test to only care about the first 40 chars of uuid values.
Commit
3537c75cc3c9bdc018a9209dcd2a1c98c8baea3b93438c9f6d9ebb5d6b9c7c1e
Parent
2accaaeeadd34cb…
1 file changed
+6
-6
+6
-6
| --- test/amend.test | ||
| +++ test/amend.test | ||
| @@ -27,23 +27,23 @@ | ||
| 27 | 27 | string map [list { } {\\s} \n {\\n} \r {\\r}] $comment |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | proc uuid_from_commit {res var} { |
| 31 | 31 | upvar $var UUID |
| 32 | - regexp {^New_Version: ([0-9a-f]{40,64})$} $res m UUID | |
| 32 | + regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | proc uuid_from_branch {res var} { |
| 36 | 36 | upvar $var UUID |
| 37 | - regexp {^New branch: ([0-9a-f]{40,64})$} $res m UUID | |
| 37 | + regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID | |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | proc uuid_from_checkout {var} { |
| 41 | 41 | global RESULT |
| 42 | 42 | upvar $var UUID |
| 43 | 43 | fossil status |
| 44 | - regexp {checkout:\s+([0-9a-f]{40,64})} $RESULT m UUID | |
| 44 | + regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | # Make sure we are not in an open repository and initialize new repository |
| 48 | 48 | test_setup |
| 49 | 49 | |
| @@ -113,11 +113,11 @@ | ||
| 113 | 113 | [string match "*Change*background*color*to*\"$result\"*" $RESULT] |
| 114 | 114 | } |
| 115 | 115 | if {[artifact_from_timeline $RESULT artid]} { |
| 116 | 116 | fossil artifact $artid |
| 117 | 117 | test amend-bgcolor-1.$tc.d { |
| 118 | - [string match "*T +bgcolor $UUID $result*" $RESULT] | |
| 118 | + [string match "*T +bgcolor $UUID* $result*" $RESULT] | |
| 119 | 119 | } |
| 120 | 120 | } else { |
| 121 | 121 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 122 | 122 | test amend-bgcolor-1.$tc.d false |
| 123 | 123 | } |
| @@ -157,11 +157,11 @@ | ||
| 157 | 157 | [string match {*Change*branch*background*color*to*"yellow".*} $RESULT] |
| 158 | 158 | } |
| 159 | 159 | if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} { |
| 160 | 160 | fossil artifact $artid |
| 161 | 161 | test amend-branchcolor-1.4 { |
| 162 | - [string match "*T \*bgcolor $UUID2 yellow*" $RESULT] | |
| 162 | + [string match "*T \*bgcolor $UUID2* yellow*" $RESULT] | |
| 163 | 163 | } |
| 164 | 164 | } else { |
| 165 | 165 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 166 | 166 | test amend-branchcolor-1.4 false |
| 167 | 167 | } |
| @@ -347,11 +347,11 @@ | ||
| 347 | 347 | } |
| 348 | 348 | fossil timeline -n 1 |
| 349 | 349 | if {[artifact_from_timeline $RESULT artid]} { |
| 350 | 350 | fossil artifact $artid |
| 351 | 351 | test amend-comment-$name.2 { |
| 352 | - [string match "*T +comment $UUID *[manifest_comment $comment]*" $RESULT] | |
| 352 | + [string match "*T +comment $UUID* *[manifest_comment $comment]*" $RESULT] | |
| 353 | 353 | } |
| 354 | 354 | } else { |
| 355 | 355 | if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" } |
| 356 | 356 | test amend-comment-$name.2 false |
| 357 | 357 | } |
| 358 | 358 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -27,23 +27,23 @@ | |
| 27 | string map [list { } {\\s} \n {\\n} \r {\\r}] $comment |
| 28 | } |
| 29 | |
| 30 | proc uuid_from_commit {res var} { |
| 31 | upvar $var UUID |
| 32 | regexp {^New_Version: ([0-9a-f]{40,64})$} $res m UUID |
| 33 | } |
| 34 | |
| 35 | proc uuid_from_branch {res var} { |
| 36 | upvar $var UUID |
| 37 | regexp {^New branch: ([0-9a-f]{40,64})$} $res m UUID |
| 38 | } |
| 39 | |
| 40 | proc uuid_from_checkout {var} { |
| 41 | global RESULT |
| 42 | upvar $var UUID |
| 43 | fossil status |
| 44 | regexp {checkout:\s+([0-9a-f]{40,64})} $RESULT m UUID |
| 45 | } |
| 46 | |
| 47 | # Make sure we are not in an open repository and initialize new repository |
| 48 | test_setup |
| 49 | |
| @@ -113,11 +113,11 @@ | |
| 113 | [string match "*Change*background*color*to*\"$result\"*" $RESULT] |
| 114 | } |
| 115 | if {[artifact_from_timeline $RESULT artid]} { |
| 116 | fossil artifact $artid |
| 117 | test amend-bgcolor-1.$tc.d { |
| 118 | [string match "*T +bgcolor $UUID $result*" $RESULT] |
| 119 | } |
| 120 | } else { |
| 121 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 122 | test amend-bgcolor-1.$tc.d false |
| 123 | } |
| @@ -157,11 +157,11 @@ | |
| 157 | [string match {*Change*branch*background*color*to*"yellow".*} $RESULT] |
| 158 | } |
| 159 | if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} { |
| 160 | fossil artifact $artid |
| 161 | test amend-branchcolor-1.4 { |
| 162 | [string match "*T \*bgcolor $UUID2 yellow*" $RESULT] |
| 163 | } |
| 164 | } else { |
| 165 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 166 | test amend-branchcolor-1.4 false |
| 167 | } |
| @@ -347,11 +347,11 @@ | |
| 347 | } |
| 348 | fossil timeline -n 1 |
| 349 | if {[artifact_from_timeline $RESULT artid]} { |
| 350 | fossil artifact $artid |
| 351 | test amend-comment-$name.2 { |
| 352 | [string match "*T +comment $UUID *[manifest_comment $comment]*" $RESULT] |
| 353 | } |
| 354 | } else { |
| 355 | if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" } |
| 356 | test amend-comment-$name.2 false |
| 357 | } |
| 358 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -27,23 +27,23 @@ | |
| 27 | string map [list { } {\\s} \n {\\n} \r {\\r}] $comment |
| 28 | } |
| 29 | |
| 30 | proc uuid_from_commit {res var} { |
| 31 | upvar $var UUID |
| 32 | regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID |
| 33 | } |
| 34 | |
| 35 | proc uuid_from_branch {res var} { |
| 36 | upvar $var UUID |
| 37 | regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID |
| 38 | } |
| 39 | |
| 40 | proc uuid_from_checkout {var} { |
| 41 | global RESULT |
| 42 | upvar $var UUID |
| 43 | fossil status |
| 44 | regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID |
| 45 | } |
| 46 | |
| 47 | # Make sure we are not in an open repository and initialize new repository |
| 48 | test_setup |
| 49 | |
| @@ -113,11 +113,11 @@ | |
| 113 | [string match "*Change*background*color*to*\"$result\"*" $RESULT] |
| 114 | } |
| 115 | if {[artifact_from_timeline $RESULT artid]} { |
| 116 | fossil artifact $artid |
| 117 | test amend-bgcolor-1.$tc.d { |
| 118 | [string match "*T +bgcolor $UUID* $result*" $RESULT] |
| 119 | } |
| 120 | } else { |
| 121 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 122 | test amend-bgcolor-1.$tc.d false |
| 123 | } |
| @@ -157,11 +157,11 @@ | |
| 157 | [string match {*Change*branch*background*color*to*"yellow".*} $RESULT] |
| 158 | } |
| 159 | if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} { |
| 160 | fossil artifact $artid |
| 161 | test amend-branchcolor-1.4 { |
| 162 | [string match "*T \*bgcolor $UUID2* yellow*" $RESULT] |
| 163 | } |
| 164 | } else { |
| 165 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 166 | test amend-branchcolor-1.4 false |
| 167 | } |
| @@ -347,11 +347,11 @@ | |
| 347 | } |
| 348 | fossil timeline -n 1 |
| 349 | if {[artifact_from_timeline $RESULT artid]} { |
| 350 | fossil artifact $artid |
| 351 | test amend-comment-$name.2 { |
| 352 | [string match "*T +comment $UUID* *[manifest_comment $comment]*" $RESULT] |
| 353 | } |
| 354 | } else { |
| 355 | if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" } |
| 356 | test amend-comment-$name.2 false |
| 357 | } |
| 358 |