Fossil SCM

Filerevtree helper. Added missing requirements, and dialed the verbosity down.

aku 2007-11-25 07:30 trunk
Commit 124fef5b1cdefe9e10f943e17cee2b731f3fa50f
--- tools/cvs2fossil/filerevtree
+++ tools/cvs2fossil/filerevtree
@@ -30,15 +30,21 @@
3030
package require struct::list ; # Higher order list ops.
3131
package require vc::fossil::import::cvs::project::rev ; # Changesets
3232
package require vc::fossil::import::cvs::state ; # State storage.
3333
package require vc::tools::misc ; # Min/max.
3434
package require vc::tools::dot ; # Graph export to DOT.
35
+package require vc::tools::trouble ; # Error reporting
36
+package require vc::tools::log ; # User feedback
3537
3638
namespace import ::vc::fossil::import::cvs::state
3739
namespace import ::vc::fossil::import::cvs::project::rev
3840
namespace import ::vc::tools::dot
41
+namespace import ::vc::tools::trouble
42
+namespace import ::vc::tools::log
3943
namespace import ::vc::tools::misc::*
44
+
45
+log verbosity 0
4046
4147
# Process the command line, i.e. get the database to access, and file
4248
# of interest. The latter can be specified by name, id, or indirectly
4349
# through the id of one of the revisions it contains.
4450
@@ -79,10 +85,11 @@
7985
default {
8086
trouble fatal \
8187
"Unknown spec \"$what\", expected one of \"fid\", \"fname\", or \"rid\""
8288
}
8389
}
90
+trouble abort?
8491
8592
set pid [state one { SELECT pid FROM file WHERE fid == $fid }]
8693
8794
puts "File : [state one { SELECT name FROM file WHERE fid = $fid }] ($fid)"
8895
puts "Project : [state one { SELECT name FROM project WHERE pid = $pid }] ($pid)"
8996
--- tools/cvs2fossil/filerevtree
+++ tools/cvs2fossil/filerevtree
@@ -30,15 +30,21 @@
30 package require struct::list ; # Higher order list ops.
31 package require vc::fossil::import::cvs::project::rev ; # Changesets
32 package require vc::fossil::import::cvs::state ; # State storage.
33 package require vc::tools::misc ; # Min/max.
34 package require vc::tools::dot ; # Graph export to DOT.
 
 
35
36 namespace import ::vc::fossil::import::cvs::state
37 namespace import ::vc::fossil::import::cvs::project::rev
38 namespace import ::vc::tools::dot
 
 
39 namespace import ::vc::tools::misc::*
 
 
40
41 # Process the command line, i.e. get the database to access, and file
42 # of interest. The latter can be specified by name, id, or indirectly
43 # through the id of one of the revisions it contains.
44
@@ -79,10 +85,11 @@
79 default {
80 trouble fatal \
81 "Unknown spec \"$what\", expected one of \"fid\", \"fname\", or \"rid\""
82 }
83 }
 
84
85 set pid [state one { SELECT pid FROM file WHERE fid == $fid }]
86
87 puts "File : [state one { SELECT name FROM file WHERE fid = $fid }] ($fid)"
88 puts "Project : [state one { SELECT name FROM project WHERE pid = $pid }] ($pid)"
89
--- tools/cvs2fossil/filerevtree
+++ tools/cvs2fossil/filerevtree
@@ -30,15 +30,21 @@
30 package require struct::list ; # Higher order list ops.
31 package require vc::fossil::import::cvs::project::rev ; # Changesets
32 package require vc::fossil::import::cvs::state ; # State storage.
33 package require vc::tools::misc ; # Min/max.
34 package require vc::tools::dot ; # Graph export to DOT.
35 package require vc::tools::trouble ; # Error reporting
36 package require vc::tools::log ; # User feedback
37
38 namespace import ::vc::fossil::import::cvs::state
39 namespace import ::vc::fossil::import::cvs::project::rev
40 namespace import ::vc::tools::dot
41 namespace import ::vc::tools::trouble
42 namespace import ::vc::tools::log
43 namespace import ::vc::tools::misc::*
44
45 log verbosity 0
46
47 # Process the command line, i.e. get the database to access, and file
48 # of interest. The latter can be specified by name, id, or indirectly
49 # through the id of one of the revisions it contains.
50
@@ -79,10 +85,11 @@
85 default {
86 trouble fatal \
87 "Unknown spec \"$what\", expected one of \"fid\", \"fname\", or \"rid\""
88 }
89 }
90 trouble abort?
91
92 set pid [state one { SELECT pid FROM file WHERE fid == $fid }]
93
94 puts "File : [state one { SELECT name FROM file WHERE fid = $fid }] ($fid)"
95 puts "Project : [state one { SELECT name FROM project WHERE pid = $pid }] ($pid)"
96

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button