Fossil SCM
Fixed bug computing a symbol's parent. preferedparent is the voting table, not the home of the definite information. The bug caused the use of the wrong parent lod during the import of changesets. Luckily the chosen parent was not known yet, causing an abort.
Commit
a5840849d0e3ceb04bf6f5b922d4d1fddc0e82ff
Parent
0d13da30180e3eb…
1 file changed
+8
-3
| --- tools/cvs2fossil/lib/c2f_psym.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_psym.tcl | ||
| @@ -46,13 +46,18 @@ | ||
| 46 | 46 | method istrunk {} { return 0 } |
| 47 | 47 | |
| 48 | 48 | method parent {} { |
| 49 | 49 | return [$myproject getsymbol [state one { |
| 50 | 50 | SELECT S.name |
| 51 | - FROM preferedparent P, symbol S | |
| 52 | - WHERE P.sid = $myid | |
| 53 | - AND S.sid = P.pid | |
| 51 | + FROM tag T, symbol S | |
| 52 | + WHERE T.sid = $myid | |
| 53 | + AND S.sid = T.lod | |
| 54 | + UNION | |
| 55 | + SELECT S.name | |
| 56 | + FROM branch B, symbol S | |
| 57 | + WHERE B.sid = $myid | |
| 58 | + AND S.sid = B.lod | |
| 54 | 59 | }]] |
| 55 | 60 | return |
| 56 | 61 | } |
| 57 | 62 | |
| 58 | 63 | # # ## ### ##### ######## ############# |
| 59 | 64 |
| --- tools/cvs2fossil/lib/c2f_psym.tcl | |
| +++ tools/cvs2fossil/lib/c2f_psym.tcl | |
| @@ -46,13 +46,18 @@ | |
| 46 | method istrunk {} { return 0 } |
| 47 | |
| 48 | method parent {} { |
| 49 | return [$myproject getsymbol [state one { |
| 50 | SELECT S.name |
| 51 | FROM preferedparent P, symbol S |
| 52 | WHERE P.sid = $myid |
| 53 | AND S.sid = P.pid |
| 54 | }]] |
| 55 | return |
| 56 | } |
| 57 | |
| 58 | # # ## ### ##### ######## ############# |
| 59 |
| --- tools/cvs2fossil/lib/c2f_psym.tcl | |
| +++ tools/cvs2fossil/lib/c2f_psym.tcl | |
| @@ -46,13 +46,18 @@ | |
| 46 | method istrunk {} { return 0 } |
| 47 | |
| 48 | method parent {} { |
| 49 | return [$myproject getsymbol [state one { |
| 50 | SELECT S.name |
| 51 | FROM tag T, symbol S |
| 52 | WHERE T.sid = $myid |
| 53 | AND S.sid = T.lod |
| 54 | UNION |
| 55 | SELECT S.name |
| 56 | FROM branch B, symbol S |
| 57 | WHERE B.sid = $myid |
| 58 | AND S.sid = B.lod |
| 59 | }]] |
| 60 | return |
| 61 | } |
| 62 | |
| 63 | # # ## ### ##### ######## ############# |
| 64 |