@@ -56,15 +56,15 @@ proc _close_updateindex {fd after} {
56
56
uplevel #0 $after
57
57
}
58
58
59
- proc update_indexinfo {msg pathList after} {
59
+ proc update_indexinfo {msg path_list after} {
60
60
global update_index_cp
61
61
62
62
if {![lock_index update]} return
63
63
64
64
set update_index_cp 0
65
- set pathList [lsort $pathList ]
66
- set totalCnt [llength $pathList ]
67
- set batch [expr {int($totalCnt * .01) + 1}]
65
+ set path_list [lsort $path_list ]
66
+ set total_cnt [llength $path_list ]
67
+ set batch [expr {int($total_cnt * .01) + 1}]
68
68
if {$batch > 25} {set batch 25}
69
69
70
70
$::main_status start $msg [mc " files" ]
@@ -78,26 +78,26 @@ proc update_indexinfo {msg pathList after} {
78
78
fileevent $fd writable [list \
79
79
write_update_indexinfo \
80
80
$fd \
81
- $pathList \
82
- $totalCnt \
81
+ $path_list \
82
+ $total_cnt \
83
83
$batch \
84
84
$after \
85
85
]
86
86
}
87
87
88
- proc write_update_indexinfo {fd pathList totalCnt batch after} {
88
+ proc write_update_indexinfo {fd path_list total_cnt batch after} {
89
89
global update_index_cp
90
90
global file_states current_diff_path
91
91
92
- if {$update_index_cp >= $totalCnt } {
92
+ if {$update_index_cp >= $total_cnt } {
93
93
_close_updateindex $fd $after
94
94
return
95
95
}
96
96
97
97
for {set i $batch } \
98
- {$update_index_cp < $totalCnt && $i > 0} \
98
+ {$update_index_cp < $total_cnt && $i > 0} \
99
99
{incr i -1} {
100
- set path [lindex $pathList $update_index_cp ]
100
+ set path [lindex $path_list $update_index_cp ]
101
101
incr update_index_cp
102
102
103
103
set s $file_states($path)
@@ -119,18 +119,18 @@ proc write_update_indexinfo {fd pathList totalCnt batch after} {
119
119
display_file $path $new
120
120
}
121
121
122
- $::main_status update $update_index_cp $totalCnt
122
+ $::main_status update $update_index_cp $total_cnt
123
123
}
124
124
125
- proc update_index {msg pathList after} {
125
+ proc update_index {msg path_list after} {
126
126
global update_index_cp
127
127
128
128
if {![lock_index update]} return
129
129
130
130
set update_index_cp 0
131
- set pathList [lsort $pathList ]
132
- set totalCnt [llength $pathList ]
133
- set batch [expr {int($totalCnt * .01) + 1}]
131
+ set path_list [lsort $path_list ]
132
+ set total_cnt [llength $path_list ]
133
+ set batch [expr {int($total_cnt * .01) + 1}]
134
134
if {$batch > 25} {set batch 25}
135
135
136
136
$::main_status start $msg [mc " files" ]
@@ -144,26 +144,26 @@ proc update_index {msg pathList after} {
144
144
fileevent $fd writable [list \
145
145
write_update_index \
146
146
$fd \
147
- $pathList \
148
- $totalCnt \
147
+ $path_list \
148
+ $total_cnt \
149
149
$batch \
150
150
$after \
151
151
]
152
152
}
153
153
154
- proc write_update_index {fd pathList totalCnt batch after} {
154
+ proc write_update_index {fd path_list total_cnt batch after} {
155
155
global update_index_cp
156
156
global file_states current_diff_path
157
157
158
- if {$update_index_cp >= $totalCnt } {
158
+ if {$update_index_cp >= $total_cnt } {
159
159
_close_updateindex $fd $after
160
160
return
161
161
}
162
162
163
163
for {set i $batch } \
164
- {$update_index_cp < $totalCnt && $i > 0} \
164
+ {$update_index_cp < $total_cnt && $i > 0} \
165
165
{incr i -1} {
166
- set path [lindex $pathList $update_index_cp ]
166
+ set path [lindex $path_list $update_index_cp ]
167
167
incr update_index_cp
168
168
169
169
switch -glob -- [lindex $file_states($path) 0] {
@@ -190,18 +190,18 @@ proc write_update_index {fd pathList totalCnt batch after} {
190
190
display_file $path $new
191
191
}
192
192
193
- $::main_status update $update_index_cp $totalCnt
193
+ $::main_status update $update_index_cp $total_cnt
194
194
}
195
195
196
- proc checkout_index {msg pathList after} {
196
+ proc checkout_index {msg path_list after} {
197
197
global update_index_cp
198
198
199
199
if {![lock_index update]} return
200
200
201
201
set update_index_cp 0
202
- set pathList [lsort $pathList ]
203
- set totalCnt [llength $pathList ]
204
- set batch [expr {int($totalCnt * .01) + 1}]
202
+ set path_list [lsort $path_list ]
203
+ set total_cnt [llength $path_list ]
204
+ set batch [expr {int($total_cnt * .01) + 1}]
205
205
if {$batch > 25} {set batch 25}
206
206
207
207
$::main_status start $msg [mc " files" ]
@@ -221,26 +221,26 @@ proc checkout_index {msg pathList after} {
221
221
fileevent $fd writable [list \
222
222
write_checkout_index \
223
223
$fd \
224
- $pathList \
225
- $totalCnt \
224
+ $path_list \
225
+ $total_cnt \
226
226
$batch \
227
227
$after \
228
228
]
229
229
}
230
230
231
- proc write_checkout_index {fd pathList totalCnt batch after} {
231
+ proc write_checkout_index {fd path_list total_cnt batch after} {
232
232
global update_index_cp
233
233
global file_states current_diff_path
234
234
235
- if {$update_index_cp >= $totalCnt } {
235
+ if {$update_index_cp >= $total_cnt } {
236
236
_close_updateindex $fd $after
237
237
return
238
238
}
239
239
240
240
for {set i $batch } \
241
- {$update_index_cp < $totalCnt && $i > 0} \
241
+ {$update_index_cp < $total_cnt && $i > 0} \
242
242
{incr i -1} {
243
- set path [lindex $pathList $update_index_cp ]
243
+ set path [lindex $path_list $update_index_cp ]
244
244
incr update_index_cp
245
245
switch -glob -- [lindex $file_states($path) 0] {
246
246
U? {continue }
@@ -253,35 +253,35 @@ proc write_checkout_index {fd pathList totalCnt batch after} {
253
253
}
254
254
}
255
255
256
- $::main_status update $update_index_cp $totalCnt
256
+ $::main_status update $update_index_cp $total_cnt
257
257
}
258
258
259
259
proc unstage_helper {txt paths} {
260
260
global file_states current_diff_path
261
261
262
262
if {![lock_index begin-update]} return
263
263
264
- set pathList [list ]
264
+ set path_list [list ]
265
265
set after {}
266
266
foreach path $paths {
267
267
switch -glob -- [lindex $file_states($path) 0] {
268
268
A? -
269
269
M? -
270
270
T? -
271
271
D? {
272
- lappend pathList $path
272
+ lappend path_list $path
273
273
if {$path eq $current_diff_path } {
274
274
set after {reshow_diff;}
275
275
}
276
276
}
277
277
}
278
278
}
279
- if {$pathList eq {}} {
279
+ if {$path_list eq {}} {
280
280
unlock_index
281
281
} else {
282
282
update_indexinfo \
283
283
$txt \
284
- $pathList \
284
+ $path_list \
285
285
[concat $after [list ui_ready]]
286
286
}
287
287
}
@@ -305,7 +305,7 @@ proc add_helper {txt paths} {
305
305
306
306
if {![lock_index begin-update]} return
307
307
308
- set pathList [list ]
308
+ set path_list [list ]
309
309
set after {}
310
310
foreach path $paths {
311
311
switch -glob -- [lindex $file_states($path) 0] {
@@ -321,19 +321,19 @@ proc add_helper {txt paths} {
321
321
?M -
322
322
?D -
323
323
?T {
324
- lappend pathList $path
324
+ lappend path_list $path
325
325
if {$path eq $current_diff_path } {
326
326
set after {reshow_diff;}
327
327
}
328
328
}
329
329
}
330
330
}
331
- if {$pathList eq {}} {
331
+ if {$path_list eq {}} {
332
332
unlock_index
333
333
} else {
334
334
update_index \
335
335
$txt \
336
- $pathList \
336
+ $path_list \
337
337
[concat $after {ui_status [mc " Ready to commit." ]}]
338
338
}
339
339
}
@@ -393,15 +393,15 @@ proc revert_helper {txt paths} {
393
393
394
394
if {![lock_index begin-update]} return
395
395
396
- set pathList [list ]
396
+ set path_list [list ]
397
397
set after {}
398
398
foreach path $paths {
399
399
switch -glob -- [lindex $file_states($path) 0] {
400
400
U? {continue }
401
401
?M -
402
402
?T -
403
403
?D {
404
- lappend pathList $path
404
+ lappend path_list $path
405
405
if {$path eq $current_diff_path } {
406
406
set after {reshow_diff;}
407
407
}
@@ -420,12 +420,12 @@ proc revert_helper {txt paths} {
420
420
# as they have quite complex plural-form rules. Unfortunately,
421
421
# msgcat doesn't seem to support that kind of string translation.
422
422
#
423
- set n [llength $pathList ]
423
+ set n [llength $path_list ]
424
424
if {$n == 0} {
425
425
unlock_index
426
426
return
427
427
} elseif {$n == 1} {
428
- set query [mc " Revert changes in file %s?" [short_path [lindex $pathList ]]]
428
+ set query [mc " Revert changes in file %s?" [short_path [lindex $path_list ]]]
429
429
} else {
430
430
set query [mc " Revert changes in these %i files?" $n ]
431
431
}
@@ -444,7 +444,7 @@ proc revert_helper {txt paths} {
444
444
if {$reply == 1} {
445
445
checkout_index \
446
446
$txt \
447
- $pathList \
447
+ $path_list \
448
448
[concat $after [list ui_ready]]
449
449
} else {
450
450
unlock_index
0 commit comments