Fossil SCM
Collapse multiple uses of a project path into one project.
Commit
d174affb48499e3c07a3513a2f501bbc56bb639a
Parent
78da61db0ef93a6…
1 file changed
+6
-2
| --- tools/cvs2fossil/lib/c2f_repository.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_repository.tcl | ||
| @@ -36,12 +36,16 @@ | ||
| 36 | 36 | set mybase $path |
| 37 | 37 | return |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | typemethod add {path} { |
| 41 | - # Cannot be checked immediately, the base is not known while | |
| 42 | - # projects are added. | |
| 41 | + # Most things cannot be checked immediately, as the base is | |
| 42 | + # not known while projects are added. We can and do check for | |
| 43 | + # uniqueness. We accept multiple occurences of a name, and | |
| 44 | + # treat them as a single project. | |
| 45 | + | |
| 46 | + if {[lsearch -exact $myprojpaths $path] >= 0} return | |
| 43 | 47 | lappend myprojpaths $path |
| 44 | 48 | return |
| 45 | 49 | } |
| 46 | 50 | |
| 47 | 51 | typemethod projects {} { |
| 48 | 52 |
| --- tools/cvs2fossil/lib/c2f_repository.tcl | |
| +++ tools/cvs2fossil/lib/c2f_repository.tcl | |
| @@ -36,12 +36,16 @@ | |
| 36 | set mybase $path |
| 37 | return |
| 38 | } |
| 39 | |
| 40 | typemethod add {path} { |
| 41 | # Cannot be checked immediately, the base is not known while |
| 42 | # projects are added. |
| 43 | lappend myprojpaths $path |
| 44 | return |
| 45 | } |
| 46 | |
| 47 | typemethod projects {} { |
| 48 |
| --- tools/cvs2fossil/lib/c2f_repository.tcl | |
| +++ tools/cvs2fossil/lib/c2f_repository.tcl | |
| @@ -36,12 +36,16 @@ | |
| 36 | set mybase $path |
| 37 | return |
| 38 | } |
| 39 | |
| 40 | typemethod add {path} { |
| 41 | # Most things cannot be checked immediately, as the base is |
| 42 | # not known while projects are added. We can and do check for |
| 43 | # uniqueness. We accept multiple occurences of a name, and |
| 44 | # treat them as a single project. |
| 45 | |
| 46 | if {[lsearch -exact $myprojpaths $path] >= 0} return |
| 47 | lappend myprojpaths $path |
| 48 | return |
| 49 | } |
| 50 | |
| 51 | typemethod projects {} { |
| 52 |