Fossil SCM

Remember #commits to a workspace (= lod), and also their parental relationship. This will be used to control branch tagging (add/cancel), and provides us with the proper names for the tags as well.

aku 2008-03-05 03:30 trunk
Commit 011fb38dda2194b63ac19adcfd5c5c8a3d2a9d2c
--- tools/cvs2fossil/lib/c2f_ristate.tcl
+++ tools/cvs2fossil/lib/c2f_ristate.tcl
@@ -57,12 +57,13 @@
5757
[info exists mystate($parentlod)]
5858
} {Trying to inherit from undefined lod "$parentlod"}
5959
6060
set pwss $mystate($parentlod)
6161
62
- $wss defstate [$pwss getstate]
63
- $wss defid [$pwss getid]
62
+ $wss defstate [$pwss getstate]
63
+ $wss defid [$pwss getid]
64
+ $wss defparent $pwss
6465
}
6566
6667
return $wss
6768
}
6869
6970
--- tools/cvs2fossil/lib/c2f_ristate.tcl
+++ tools/cvs2fossil/lib/c2f_ristate.tcl
@@ -57,12 +57,13 @@
57 [info exists mystate($parentlod)]
58 } {Trying to inherit from undefined lod "$parentlod"}
59
60 set pwss $mystate($parentlod)
61
62 $wss defstate [$pwss getstate]
63 $wss defid [$pwss getid]
 
64 }
65
66 return $wss
67 }
68
69
--- tools/cvs2fossil/lib/c2f_ristate.tcl
+++ tools/cvs2fossil/lib/c2f_ristate.tcl
@@ -57,12 +57,13 @@
57 [info exists mystate($parentlod)]
58 } {Trying to inherit from undefined lod "$parentlod"}
59
60 set pwss $mystate($parentlod)
61
62 $wss defstate [$pwss getstate]
63 $wss defid [$pwss getid]
64 $wss defparent $pwss
65 }
66
67 return $wss
68 }
69
70
--- tools/cvs2fossil/lib/c2f_wsstate.tcl
+++ tools/cvs2fossil/lib/c2f_wsstate.tcl
@@ -29,15 +29,18 @@
2929
# # ## ### ##### ######## #############
3030
## Public API
3131
3232
constructor {lod} {
3333
# Start with an empty state
34
- set myname $lod
34
+ set myname $lod
35
+ set myticks 0
36
+ set myparent {}
3537
return
3638
}
3739
38
- method name {} { return $myname }
40
+ method name {} { return $myname }
41
+ method ticks {} { return $myticks }
3942
4043
method add {oprevisioninfo} {
4144
# oprevisioninfo = list (rid path label op ...) /quadruples
4245
4346
# Overwrite all changed files (identified by path) with the
@@ -55,10 +58,12 @@
5558
}
5659
} else {
5760
set mystate($path) [list $rid $label]
5861
}
5962
}
63
+
64
+ incr myticks
6065
return
6166
}
6267
6368
method get {} {
6469
set res {}
@@ -76,10 +81,16 @@
7681
7782
method getid {} { return $myid }
7883
7984
method defstate {s} { array set mystate $s ; return }
8085
method getstate {} { return [array get mystate] }
86
+
87
+ method parent {} { return $myparent }
88
+ method defparent {parent} {
89
+ set myparent $parent
90
+ return
91
+ }
8192
8293
# # ## ### ##### ######## #############
8394
## State
8495
8596
variable myname {} ; # Name of the LOD the workspace is
@@ -87,10 +98,13 @@
8798
variable myid {} ; # Record id of the fossil manifest
8899
# associated with the current state.
89100
variable mystate -array {} ; # Map from paths to the recordid of
90101
# the file revision behind it, and
91102
# the associated label for logging.
103
+ variable myticks 0 ; # Number of 'add' operations
104
+ # performed on the state.
105
+ variable myparent {} ; # Reference to the parent workspace.
92106
93107
typevariable myop -array {
94108
-1 REM
95109
0 ---
96110
1 ADD
97111
--- tools/cvs2fossil/lib/c2f_wsstate.tcl
+++ tools/cvs2fossil/lib/c2f_wsstate.tcl
@@ -29,15 +29,18 @@
29 # # ## ### ##### ######## #############
30 ## Public API
31
32 constructor {lod} {
33 # Start with an empty state
34 set myname $lod
 
 
35 return
36 }
37
38 method name {} { return $myname }
 
39
40 method add {oprevisioninfo} {
41 # oprevisioninfo = list (rid path label op ...) /quadruples
42
43 # Overwrite all changed files (identified by path) with the
@@ -55,10 +58,12 @@
55 }
56 } else {
57 set mystate($path) [list $rid $label]
58 }
59 }
 
 
60 return
61 }
62
63 method get {} {
64 set res {}
@@ -76,10 +81,16 @@
76
77 method getid {} { return $myid }
78
79 method defstate {s} { array set mystate $s ; return }
80 method getstate {} { return [array get mystate] }
 
 
 
 
 
 
81
82 # # ## ### ##### ######## #############
83 ## State
84
85 variable myname {} ; # Name of the LOD the workspace is
@@ -87,10 +98,13 @@
87 variable myid {} ; # Record id of the fossil manifest
88 # associated with the current state.
89 variable mystate -array {} ; # Map from paths to the recordid of
90 # the file revision behind it, and
91 # the associated label for logging.
 
 
 
92
93 typevariable myop -array {
94 -1 REM
95 0 ---
96 1 ADD
97
--- tools/cvs2fossil/lib/c2f_wsstate.tcl
+++ tools/cvs2fossil/lib/c2f_wsstate.tcl
@@ -29,15 +29,18 @@
29 # # ## ### ##### ######## #############
30 ## Public API
31
32 constructor {lod} {
33 # Start with an empty state
34 set myname $lod
35 set myticks 0
36 set myparent {}
37 return
38 }
39
40 method name {} { return $myname }
41 method ticks {} { return $myticks }
42
43 method add {oprevisioninfo} {
44 # oprevisioninfo = list (rid path label op ...) /quadruples
45
46 # Overwrite all changed files (identified by path) with the
@@ -55,10 +58,12 @@
58 }
59 } else {
60 set mystate($path) [list $rid $label]
61 }
62 }
63
64 incr myticks
65 return
66 }
67
68 method get {} {
69 set res {}
@@ -76,10 +81,16 @@
81
82 method getid {} { return $myid }
83
84 method defstate {s} { array set mystate $s ; return }
85 method getstate {} { return [array get mystate] }
86
87 method parent {} { return $myparent }
88 method defparent {parent} {
89 set myparent $parent
90 return
91 }
92
93 # # ## ### ##### ######## #############
94 ## State
95
96 variable myname {} ; # Name of the LOD the workspace is
@@ -87,10 +98,13 @@
98 variable myid {} ; # Record id of the fossil manifest
99 # associated with the current state.
100 variable mystate -array {} ; # Map from paths to the recordid of
101 # the file revision behind it, and
102 # the associated label for logging.
103 variable myticks 0 ; # Number of 'add' operations
104 # performed on the state.
105 variable myparent {} ; # Reference to the parent workspace.
106
107 typevariable myop -array {
108 -1 REM
109 0 ---
110 1 ADD
111

Keyboard Shortcuts

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