##// END OF EJS Templates
hgk: select first changeset at startup (issue1382)
Martin Geisler -
r7776:34ff1a1b default
parent child Browse files
Show More
@@ -265,6 +265,7 b' proc readcommit {id} {'
265
265
266 proc parsecommit {id contents listed olds} {
266 proc parsecommit {id contents listed olds} {
267 global commitinfo children nchildren parents nparents cdate ncleft
267 global commitinfo children nchildren parents nparents cdate ncleft
268 global firstparents
268
269
269 set inhdr 1
270 set inhdr 1
270 set comment {}
271 set comment {}
@@ -338,6 +339,33 b' proc parsecommit {id contents listed old'
338 }
339 }
339 set commitinfo($id) [list $headline $auname $audate \
340 set commitinfo($id) [list $headline $auname $audate \
340 $comname $comdate $comment $rev $branch]
341 $comname $comdate $comment $rev $branch]
342
343 if {[info exists firstparents]} {
344 set i [lsearch $firstparents $id]
345 if {$i != -1} {
346 # remove the parent from firstparents, possible building
347 # an empty list
348 set firstparents [concat \
349 [lrange $firstparents 0 [expr $i - 1]] \
350 [lrange $firstparents [expr $i + 1] end]]
351 if {$firstparents eq {}} {
352 # we have found all parents of the first changeset
353 # which means that we can safely select the first line
354 after idle {
355 selectline 0 0
356 }
357 }
358 }
359 } else {
360 # this is the first changeset, save the parents
361 set firstparents $olds
362 if {$firstparents eq {}} {
363 # a repository with a single changeset
364 after idle {
365 selectline 0 0
366 }
367 }
368 }
341 }
369 }
342
370
343 proc readrefs {} {
371 proc readrefs {} {
General Comments 0
You need to be logged in to leave comments. Login now