Fossil SCM
Accept a last trunk-changeset on a vendor branch with the :trunk: already defined, and warn. Force changeset to be vendor-only, out of trunk.
Commit
a1bbf19d511ca86c5da1ad2cb5b32d4e45d2f308
Parent
7caaf7afd5d74bc…
1 file changed
+11
-2
+11
-2
| --- tools/cvs2fossil/lib/c2f_prev.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | ||
| @@ -428,14 +428,23 @@ | ||
| 428 | 428 | [$lws getid] [$lws get]] |
| 429 | 429 | |
| 430 | 430 | # Remember the imported changeset in the state, under our |
| 431 | 431 | # LOD. And if it is the last trunk changeset on the vendor |
| 432 | 432 | # branch then the revision is also the actual root of the |
| 433 | - # :trunk:, so we remember it as such in the state. | |
| 433 | + # :trunk:, so we remember it as such in the state. However if | |
| 434 | + # the trunk already exists then the changeset cannot be on it | |
| 435 | + # any more. This indicates weirdness in the setup of the | |
| 436 | + # vendor branch, but one we can work around. | |
| 434 | 437 | |
| 435 | 438 | $lws defid $uuid |
| 436 | - if {$lastdefaultontrunk} { $rstate new :trunk: [$lws name] } | |
| 439 | + if {$lastdefaultontrunk} { | |
| 440 | + if {[$rstate has :trunk:]} { | |
| 441 | + log write 2 csets {Multiple changesets declared to be the last trunk changeset on the vendor-branch} | |
| 442 | + } else { | |
| 443 | + $rstate new :trunk: [$lws name] | |
| 444 | + } | |
| 445 | + } | |
| 437 | 446 | |
| 438 | 447 | # Remember the whole changeset / uuid mapping, for the tags. |
| 439 | 448 | |
| 440 | 449 | state run { |
| 441 | 450 | INSERT INTO csuuid (cid, uuid) |
| 442 | 451 |
| --- tools/cvs2fossil/lib/c2f_prev.tcl | |
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | |
| @@ -428,14 +428,23 @@ | |
| 428 | [$lws getid] [$lws get]] |
| 429 | |
| 430 | # Remember the imported changeset in the state, under our |
| 431 | # LOD. And if it is the last trunk changeset on the vendor |
| 432 | # branch then the revision is also the actual root of the |
| 433 | # :trunk:, so we remember it as such in the state. |
| 434 | |
| 435 | $lws defid $uuid |
| 436 | if {$lastdefaultontrunk} { $rstate new :trunk: [$lws name] } |
| 437 | |
| 438 | # Remember the whole changeset / uuid mapping, for the tags. |
| 439 | |
| 440 | state run { |
| 441 | INSERT INTO csuuid (cid, uuid) |
| 442 |
| --- tools/cvs2fossil/lib/c2f_prev.tcl | |
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | |
| @@ -428,14 +428,23 @@ | |
| 428 | [$lws getid] [$lws get]] |
| 429 | |
| 430 | # Remember the imported changeset in the state, under our |
| 431 | # LOD. And if it is the last trunk changeset on the vendor |
| 432 | # branch then the revision is also the actual root of the |
| 433 | # :trunk:, so we remember it as such in the state. However if |
| 434 | # the trunk already exists then the changeset cannot be on it |
| 435 | # any more. This indicates weirdness in the setup of the |
| 436 | # vendor branch, but one we can work around. |
| 437 | |
| 438 | $lws defid $uuid |
| 439 | if {$lastdefaultontrunk} { |
| 440 | if {[$rstate has :trunk:]} { |
| 441 | log write 2 csets {Multiple changesets declared to be the last trunk changeset on the vendor-branch} |
| 442 | } else { |
| 443 | $rstate new :trunk: [$lws name] |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | # Remember the whole changeset / uuid mapping, for the tags. |
| 448 | |
| 449 | state run { |
| 450 | INSERT INTO csuuid (cid, uuid) |
| 451 |