From: Kevin K. <kk...@ny...> - 2011-02-11 05:10:59
|
(tcl-core post about project backup facilities deleted for brevity.) Let me add one little contribution to Andreas's yeoman effort. I started out trying to make my own mirror of the bug trackers in the CVS downtime. I learnt the hard way that attachments to bug reports, patches and feature requests are NOT included in the XML export and have to be pulled separately. There are also inconsistencies in the exports. Fortunately they're nothing too damaging, just links to two no-longer-extant users (melissa_chawla and sarnold75) and missing group, status, resolution and category codes. Most of the missing links are in the change history and not in the current values. Given the project exports, I managed to do the attached script to scan the export files and push the results into a Fossil repository. The script also does HTTP communications with SF to pull down the attachments to the items and stash them in Fossil as well. I believe the conversion to be lossless except for the data inconsistencies noted above. It's also idempotent; I believe that it should be possible to rerun at a later time into an existing Fossil repository without damage; the chief risk is that deleted artifacts will likely not be scavenged (so obsolete attachments, for instance, will still be present.) To use it: (1) Sign into SF as project admin and download the XML export of your project. (2) Create a Fossil repository if needed. (3) Run the 'scanexport.tcl' script. It takes three command line args: (a) Path name of the XML export (b) Path name of a temporary directory (I use /tmp/bugimport) where Fossil artifacts will be stored for import. The directory should not exist at the start of the run. (c) Path name of the Fossil repository where the artifacts should go. The script needs to find the 'fossil' executable on the PATH. In addition, it requires 'tdom' and the tcllib packages 'html', 'md5', and 'sha1'. It may need some jiggering if you're behind a firewall, because of all the 'http::geturl' that it does. Comments welcome. I'm really hoping that our web wizards can give some serious love to the Fossil bug tracker; it's not yet all that great from the user point of view. (The underlying model of 'ticket change artifacts' is sound, and I expect Fossil to be a rock-solid place to *store* the data. It's the programmatic front end that needs a lot of attention.) -- 73 de ke9tv/2, Kevin |