{"thread":{"id":"2664","subject":"[PATCH] gitk: add Update menu item.","startedAt":"2005-11-23T22:20:03Z","lastAt":"2005-12-08T07:52:42Z","messageCount":5,"participants":["Sven Verdoolaege","Paul Mackerras","Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12645","messageId":"20051123222003.GA16290MdfPADPa@greensroom.kotnet.org","threadId":"2664","inReplyTo":null,"subject":"[PATCH] gitk: add Update menu item.","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2005-11-23T22:20:03Z","receivedAt":"2005-11-23T22:20:03Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"Update will redraw the commits if any commits have been added to any\nof the selected heads.  The new commits appear on the top.\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n\n---\nUpdated patch against recent gitk in case someone is interested.\nPrevious version has been working for without any glitches.\n\nskimo\n\n gitk |  176 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------------\n 1 files changed, 142 insertions(+), 34 deletions(-)\n\napplies-to: c183291c9f13912f9111ee0ab2e24ac47f3147ed\n6a2a3df712ce55ecbae91367b285ce295f38a558\ndiff --git a/gitk b/gitk\nindex 3dd97e2..352a319 100755\n--- a/gitk\n+++ b/gitk\n@@ -16,8 +16,24 @@ proc gitdir {} {\n     }\n }\n \n+proc parse_args {rargs} {\n+    global parsed_args\n+\n+    if [catch {\n+\tset parse_args [concat --default HEAD $rargs]\n+\tset parsed_args [split [eval exec git-rev-parse $parse_args] \"\\n\"]\n+    }] {\n+\t# if git-rev-parse failed for some reason...\n+\tif {$rargs == {}} {\n+\t    set rargs HEAD\n+\t}\n+\tset parsed_args $rargs\n+    }\n+    return $parsed_args\n+}\n+\n proc getcommits {rargs} {\n-    global commits commfd phase canv mainfont env\n+    global oldcommits commits commfd phase canv mainfont env\n     global startmsecs nextupdate ncmupdate\n     global ctext maincursor textcursor leftover\n \n@@ -27,21 +43,13 @@ proc getcommits {rargs} {\n \terror_popup \"Cannot find the git directory \\\"$gitdir\\\".\"\n \texit 1\n     }\n+    set oldcommits {}\n     set commits {}\n     set phase getcommits\n     set startmsecs [clock clicks -milliseconds]\n     set nextupdate [expr $startmsecs + 100]\n     set ncmupdate 1\n-    if [catch {\n-\tset parse_args [concat --default HEAD $rargs]\n-\tset parsed_args [split [eval exec git-rev-parse $parse_args] \"\\n\"]\n-    }] {\n-\t# if git-rev-parse failed for some reason...\n-\tif {$rargs == {}} {\n-\t    set rargs HEAD\n-\t}\n-\tset parsed_args $rargs\n-    }\n+    set parsed_args [parse_args $rargs]\n     if [catch {\n \tset commfd [open \"|git-rev-list --header --topo-order --parents $parsed_args\" r]\n     } err] {\n@@ -59,9 +67,10 @@ proc getcommits {rargs} {\n }\n \n proc getcommitlines {commfd}  {\n-    global commits parents cdate children\n+    global oldcommits commits parents cdate children nchildren\n     global commitlisted phase nextupdate\n     global stopped redisplaying leftover\n+    global canv\n \n     set stuff [read $commfd]\n     if {$stuff == {}} {\n@@ -119,10 +128,18 @@ to allow selection of commits to be disp\n \tset id [lindex $ids 0]\n \tset olds [lrange $ids 1 end]\n \tset cmit [string range $cmit [expr {$j + 1}] end]\n+\tif {$phase == \"updatecommits\"} {\n+\t    $canv delete all\n+\t    set oldcommits $commits\n+\t    set commits {}\n+\t    unset children\n+\t    unset nchildren\n+\t    set phase getcommits\n+\t}\n \tlappend commits $id\n \tset commitlisted($id) 1\n \tparsecommit $id $cmit 1 [lrange $ids 1 end]\n-\tdrawcommit $id\n+\tdrawcommit $id 1\n \tif {[clock clicks -milliseconds] >= $nextupdate} {\n \t    doupdate 1\n \t}\n@@ -132,7 +149,7 @@ to allow selection of commits to be disp\n \t\tset stopped 0\n \t\tset phase \"getcommits\"\n \t\tforeach id $commits {\n-\t\t    drawcommit $id\n+\t\t    drawcommit $id 1\n \t\t    if {$stopped} break\n \t\t    if {[clock clicks -milliseconds] >= $nextupdate} {\n \t\t\tdoupdate 1\n@@ -168,16 +185,9 @@ proc readcommit {id} {\n     parsecommit $id $contents 0 {}\n }\n \n-proc parsecommit {id contents listed olds} {\n-    global commitinfo children nchildren parents nparents cdate ncleft\n+proc updatechildren {id olds} {\n+    global children nchildren parents nparents ncleft\n \n-    set inhdr 1\n-    set comment {}\n-    set headline {}\n-    set auname {}\n-    set audate {}\n-    set comname {}\n-    set comdate {}\n     if {![info exists nchildren($id)]} {\n \tset children($id) {}\n \tset nchildren($id) 0\n@@ -196,6 +206,19 @@ proc parsecommit {id contents listed old\n \t    incr ncleft($p)\n \t}\n     }\n+}\n+\n+proc parsecommit {id contents listed olds} {\n+    global commitinfo cdate\n+\n+    set inhdr 1\n+    set comment {}\n+    set headline {}\n+    set auname {}\n+    set audate {}\n+    set comname {}\n+    set comdate {}\n+    updatechildren $id $olds\n     set hdrend [string first \"\\n\\n\" $contents]\n     if {$hdrend < 0} {\n \t# should never happen...\n@@ -243,6 +266,9 @@ proc readrefs {} {\n     global tagids idtags headids idheads tagcontents\n     global otherrefids idotherrefs\n \n+    foreach v {tagids idtags headids idheads otherrefids idotherrefs} {\n+\tcatch {unset $v}\n+    }\n     set refd [open [list | git-ls-remote [gitdir]] r]\n     while {0 <= [set n [gets $refd line]]} {\n \tif {![regexp {^([0-9a-f]{40})\trefs/([^^]*)$} $line \\\n@@ -292,7 +318,7 @@ proc error_popup msg {\n     tkwait window $w\n }\n \n-proc makewindow {} {\n+proc makewindow {rargs} {\n     global canv canv2 canv3 linespc charspc ctext cflist textfont\n     global findtype findtypemenu findloc findstring fstring geometry\n     global entries sha1entry sha1string sha1but\n@@ -302,6 +328,7 @@ proc makewindow {} {\n     menu .bar\n     .bar add cascade -label \"File\" -menu .bar.file\n     menu .bar.file\n+    .bar.file add command -label \"Update\" -command [list updatecommits $rargs]\n     .bar.file add command -label \"Reread references\" -command rereadrefs\n     .bar.file add command -label \"Quit\" -command doquit\n     menu .bar.help\n@@ -1416,8 +1443,9 @@ proc decidenext {{noread 0}} {\n     return $level\n }\n \n-proc drawcommit {id} {\n+proc drawcommit {id reading} {\n     global phase todo nchildren datemode nextupdate revlistorder\n+    global numcommits ncmupdate displayorder todo onscreen\n     global numcommits ncmupdate displayorder todo onscreen parents\n \n     if {$phase != \"incrdraw\"} {\n@@ -1455,20 +1483,29 @@ proc drawcommit {id} {\n \t    }\n \t}\n     }\n-    drawmore 1\n+    drawmore $reading\n }\n \n proc finishcommits {} {\n-    global phase\n+    global phase oldcommits commits\n     global canv mainfont ctext maincursor textcursor\n+    global parents\n \n-    if {$phase != \"incrdraw\"} {\n+    if {$phase == \"incrdraw\" || $phase == \"removecommits\"} {\n+\tforeach id $oldcommits {\n+\t    lappend commits $id\n+\t    updatechildren $id $parents($id)\n+\t    drawcommit $id 0\n+\t}\n+\tset oldcommits {}\n+\tdrawrest\n+    } elseif {$phase == \"updatecommits\"} {\n+\tset phase {}\n+    } else {\n \t$canv delete all\n \t$canv create text 3 3 -anchor nw -text \"No commits selected\" \\\n \t    -font $mainfont -tags textitems\n \tset phase {}\n-    } else {\n-\tdrawrest\n     }\n     . config -cursor $maincursor\n     settextcursor $textcursor\n@@ -3596,9 +3633,6 @@ proc rereadrefs {} {\n \t    set ref($id) [listrefs $id]\n \t}\n     }\n-    foreach v {tagids idtags headids idheads otherrefids idotherrefs} {\n-\tcatch {unset $v}\n-    }\n     readrefs\n     set refids [lsort -unique [concat $refids [array names idtags] \\\n \t\t\t[array names idheads] [array names idotherrefs]]]\n@@ -3610,6 +3644,80 @@ proc rereadrefs {} {\n     }\n }\n \n+proc updatecommits {rargs} {\n+    global commitlisted commfd phase\n+    global startmsecs nextupdate ncmupdate\n+    global idtags idheads idotherrefs\n+    global leftover\n+    global parsed_args\n+    global canv\n+    global oldcommits commits\n+    global parents nchildren children ncleft\n+\n+    set old_args $parsed_args\n+    parse_args $rargs\n+\n+    foreach id $old_args {\n+\tif {![regexp {^[0-9a-f]{40}$} $id]} continue\n+\tif {[info exists oldref($id)]} continue\n+\tset oldref($id) $id\n+\tlappend ignoreold \"^$id\"\n+    }\n+    foreach id $parsed_args {\n+\tif {![regexp {^[0-9a-f]{40}$} $id]} continue\n+\tif {[info exists ref($id)]} continue\n+\tset ref($id) $id\n+\tlappend ignorenew \"^$id\"\n+    }\n+\n+    foreach a $old_args {\n+\tif {![info exists ref($a)]} {\n+\t    lappend ignorenew $a\n+\t}\n+    }\n+\n+    set phase updatecommits\n+    set removed_commits [split [eval exec git-rev-list $ignorenew] \"\\n\" ]\n+    if {[llength $removed_commits] > 0} {\n+\t$canv delete all\n+\tset oldcommits {}\n+\tforeach c $commits {\n+\t    if {[lsearch $c $removed_commits] < 0} {\n+\t\tlappend oldcommits $c\n+\t    } else {\n+\t\tunset commitlisted($c)\n+\t    }\n+\t}\n+\tset commits {}\n+\tunset children\n+\tunset nchildren\n+\tset phase removecommits\n+    }\n+\n+    set args {}\n+    foreach a $parsed_args {\n+\tif {![info exists oldref($a)]} {\n+\t    lappend args $a\n+\t}\n+    }\n+\n+    readrefs\n+    if [catch {\n+\tset commfd [open \"|git-rev-list --header --topo-order --parents $args $ignoreold\" r]\n+    } err] {\n+\tputs stderr \"Error executing git-rev-list: $err\"\n+\texit 1\n+    }\n+    set startmsecs [clock clicks -milliseconds]\n+    set nextupdate [expr $startmsecs + 100]\n+    set ncmupdate 1\n+    set leftover {}\n+    fconfigure $commfd -blocking 0 -translation lf\n+    fileevent $commfd readable [list getcommitlines $commfd]\n+    . config -cursor watch\n+    settextcursor watch\n+}\n+\n proc showtag {tag isnew} {\n     global ctext cflist tagcontents tagids linknum\n \n@@ -3697,6 +3805,6 @@ set redisplaying 0\n set stuffsaved 0\n set patchnum 0\n setcoords\n-makewindow\n+makewindow $revtreeargs\n readrefs\n getcommits $revtreeargs\n---\n0.99.9.GIT\n"},{"id":"12945","messageId":"20051129211551.GF8383MdfPADPa@greensroom.kotnet.org","threadId":"2664","inReplyTo":"20051123222003.GA16290MdfPADPa@greensroom.kotnet.org","subject":"[PATCH] gitk: add Update menu item.","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2005-11-29T21:15:51Z","receivedAt":"2005-11-29T21:15:51Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"Update will redraw the commits if any commits have been added to any\nof the selected heads.  The new commits appear on the top.\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n\n---\nJunio noticed that my patch didn't work if you use path specifiers.\nThis update should fix this problem.\n\nskimo\n\n gitk |  176 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------------\n 1 files changed, 142 insertions(+), 34 deletions(-)\n\napplies-to: 4000f8b8d01ad35929972c07d98d89e2280cf3d3\nf24c2e402dd592f5bd5047724da30a8a5e0115eb\ndiff --git a/gitk b/gitk\nindex 730ffd9..de5c8b1 100755\n--- a/gitk\n+++ b/gitk\n@@ -16,8 +16,24 @@ proc gitdir {} {\n     }\n }\n \n+proc parse_args {rargs} {\n+    global parsed_args\n+\n+    if [catch {\n+\tset parse_args [concat --default HEAD $rargs]\n+\tset parsed_args [split [eval exec git-rev-parse $parse_args] \"\\n\"]\n+    }] {\n+\t# if git-rev-parse failed for some reason...\n+\tif {$rargs == {}} {\n+\t    set rargs HEAD\n+\t}\n+\tset parsed_args $rargs\n+    }\n+    return $parsed_args\n+}\n+\n proc getcommits {rargs} {\n-    global commits commfd phase canv mainfont env\n+    global oldcommits commits commfd phase canv mainfont env\n     global startmsecs nextupdate ncmupdate\n     global ctext maincursor textcursor leftover gitencoding\n \n@@ -27,21 +43,13 @@ proc getcommits {rargs} {\n \terror_popup \"Cannot find the git directory \\\"$gitdir\\\".\"\n \texit 1\n     }\n+    set oldcommits {}\n     set commits {}\n     set phase getcommits\n     set startmsecs [clock clicks -milliseconds]\n     set nextupdate [expr {$startmsecs + 100}]\n     set ncmupdate 1\n-    if [catch {\n-\tset parse_args [concat --default HEAD $rargs]\n-\tset parsed_args [split [eval exec git-rev-parse $parse_args] \"\\n\"]\n-    }] {\n-\t# if git-rev-parse failed for some reason...\n-\tif {$rargs == {}} {\n-\t    set rargs HEAD\n-\t}\n-\tset parsed_args $rargs\n-    }\n+    set parsed_args [parse_args $rargs]\n     if [catch {\n \tset commfd [open \"|git-rev-list --header --topo-order --parents $parsed_args\" r]\n     } err] {\n@@ -59,9 +67,10 @@ proc getcommits {rargs} {\n }\n \n proc getcommitlines {commfd}  {\n-    global commits parents cdate children\n+    global oldcommits commits parents cdate children nchildren\n     global commitlisted phase nextupdate\n     global stopped redisplaying leftover\n+    global canv\n \n     set stuff [read $commfd]\n     if {$stuff == {}} {\n@@ -119,10 +128,18 @@ proc getcommitlines {commfd}  {\n \tset id [lindex $ids 0]\n \tset olds [lrange $ids 1 end]\n \tset cmit [string range $cmit [expr {$j + 1}] end]\n+\tif {$phase == \"updatecommits\"} {\n+\t    $canv delete all\n+\t    set oldcommits $commits\n+\t    set commits {}\n+\t    unset children\n+\t    unset nchildren\n+\t    set phase getcommits\n+\t}\n \tlappend commits $id\n \tset commitlisted($id) 1\n \tparsecommit $id $cmit 1 [lrange $ids 1 end]\n-\tdrawcommit $id\n+\tdrawcommit $id 1\n \tif {[clock clicks -milliseconds] >= $nextupdate} {\n \t    doupdate 1\n \t}\n@@ -132,7 +149,7 @@ proc getcommitlines {commfd}  {\n \t\tset stopped 0\n \t\tset phase \"getcommits\"\n \t\tforeach id $commits {\n-\t\t    drawcommit $id\n+\t\t    drawcommit $id 1\n \t\t    if {$stopped} break\n \t\t    if {[clock clicks -milliseconds] >= $nextupdate} {\n \t\t\tdoupdate 1\n@@ -168,16 +185,9 @@ proc readcommit {id} {\n     parsecommit $id $contents 0 {}\n }\n \n-proc parsecommit {id contents listed olds} {\n-    global commitinfo children nchildren parents nparents cdate ncleft\n+proc updatechildren {id olds} {\n+    global children nchildren parents nparents ncleft\n \n-    set inhdr 1\n-    set comment {}\n-    set headline {}\n-    set auname {}\n-    set audate {}\n-    set comname {}\n-    set comdate {}\n     if {![info exists nchildren($id)]} {\n \tset children($id) {}\n \tset nchildren($id) 0\n@@ -196,6 +206,19 @@ proc parsecommit {id contents listed old\n \t    incr ncleft($p)\n \t}\n     }\n+}\n+\n+proc parsecommit {id contents listed olds} {\n+    global commitinfo cdate\n+\n+    set inhdr 1\n+    set comment {}\n+    set headline {}\n+    set auname {}\n+    set audate {}\n+    set comname {}\n+    set comdate {}\n+    updatechildren $id $olds\n     set hdrend [string first \"\\n\\n\" $contents]\n     if {$hdrend < 0} {\n \t# should never happen...\n@@ -243,6 +266,9 @@ proc readrefs {} {\n     global tagids idtags headids idheads tagcontents\n     global otherrefids idotherrefs\n \n+    foreach v {tagids idtags headids idheads otherrefids idotherrefs} {\n+\tcatch {unset $v}\n+    }\n     set refd [open [list | git-ls-remote [gitdir]] r]\n     while {0 <= [set n [gets $refd line]]} {\n \tif {![regexp {^([0-9a-f]{40})\trefs/([^^]*)$} $line \\\n@@ -292,7 +318,7 @@ proc error_popup msg {\n     tkwait window $w\n }\n \n-proc makewindow {} {\n+proc makewindow {rargs} {\n     global canv canv2 canv3 linespc charspc ctext cflist textfont\n     global findtype findtypemenu findloc findstring fstring geometry\n     global entries sha1entry sha1string sha1but\n@@ -302,6 +328,7 @@ proc makewindow {} {\n     menu .bar\n     .bar add cascade -label \"File\" -menu .bar.file\n     menu .bar.file\n+    .bar.file add command -label \"Update\" -command [list updatecommits $rargs]\n     .bar.file add command -label \"Reread references\" -command rereadrefs\n     .bar.file add command -label \"Quit\" -command doquit\n     menu .bar.help\n@@ -1416,8 +1443,9 @@ proc decidenext {{noread 0}} {\n     return $level\n }\n \n-proc drawcommit {id} {\n+proc drawcommit {id reading} {\n     global phase todo nchildren datemode nextupdate revlistorder\n+    global numcommits ncmupdate displayorder todo onscreen\n     global numcommits ncmupdate displayorder todo onscreen parents\n \n     if {$phase != \"incrdraw\"} {\n@@ -1455,20 +1483,29 @@ proc drawcommit {id} {\n \t    }\n \t}\n     }\n-    drawmore 1\n+    drawmore $reading\n }\n \n proc finishcommits {} {\n-    global phase\n+    global phase oldcommits commits\n     global canv mainfont ctext maincursor textcursor\n+    global parents\n \n-    if {$phase != \"incrdraw\"} {\n+    if {$phase == \"incrdraw\" || $phase == \"removecommits\"} {\n+\tforeach id $oldcommits {\n+\t    lappend commits $id\n+\t    updatechildren $id $parents($id)\n+\t    drawcommit $id 0\n+\t}\n+\tset oldcommits {}\n+\tdrawrest\n+    } elseif {$phase == \"updatecommits\"} {\n+\tset phase {}\n+    } else {\n \t$canv delete all\n \t$canv create text 3 3 -anchor nw -text \"No commits selected\" \\\n \t    -font $mainfont -tags textitems\n \tset phase {}\n-    } else {\n-\tdrawrest\n     }\n     . config -cursor $maincursor\n     settextcursor $textcursor\n@@ -3595,9 +3632,6 @@ proc rereadrefs {} {\n \t    set ref($id) [listrefs $id]\n \t}\n     }\n-    foreach v {tagids idtags headids idheads otherrefids idotherrefs} {\n-\tcatch {unset $v}\n-    }\n     readrefs\n     set refids [lsort -unique [concat $refids [array names idtags] \\\n \t\t\t[array names idheads] [array names idotherrefs]]]\n@@ -3609,6 +3643,80 @@ proc rereadrefs {} {\n     }\n }\n \n+proc updatecommits {rargs} {\n+    global commitlisted commfd phase\n+    global startmsecs nextupdate ncmupdate\n+    global idtags idheads idotherrefs\n+    global leftover\n+    global parsed_args\n+    global canv\n+    global oldcommits commits\n+    global parents nchildren children ncleft\n+\n+    set old_args $parsed_args\n+    parse_args $rargs\n+\n+    foreach id $old_args {\n+\tif {![regexp {^[0-9a-f]{40}$} $id]} continue\n+\tif {[info exists oldref($id)]} continue\n+\tset oldref($id) $id\n+\tlappend ignoreold \"^$id\"\n+    }\n+    foreach id $parsed_args {\n+\tif {![regexp {^[0-9a-f]{40}$} $id]} continue\n+\tif {[info exists ref($id)]} continue\n+\tset ref($id) $id\n+\tlappend ignorenew \"^$id\"\n+    }\n+\n+    foreach a $old_args {\n+\tif {![info exists ref($a)]} {\n+\t    lappend ignorenew $a\n+\t}\n+    }\n+\n+    set phase updatecommits\n+    set removed_commits [split [eval exec git-rev-list $ignorenew] \"\\n\" ]\n+    if {[llength $removed_commits] > 0} {\n+\t$canv delete all\n+\tset oldcommits {}\n+\tforeach c $commits {\n+\t    if {[lsearch $c $removed_commits] < 0} {\n+\t\tlappend oldcommits $c\n+\t    } else {\n+\t\tunset commitlisted($c)\n+\t    }\n+\t}\n+\tset commits {}\n+\tunset children\n+\tunset nchildren\n+\tset phase removecommits\n+    }\n+\n+    set args {}\n+    foreach a $parsed_args {\n+\tif {![info exists oldref($a)]} {\n+\t    lappend args $a\n+\t}\n+    }\n+\n+    readrefs\n+    if [catch {\n+\tset commfd [open \"|git-rev-list --header --topo-order --parents $ignoreold $args\" r]\n+    } err] {\n+\tputs stderr \"Error executing git-rev-list: $err\"\n+\texit 1\n+    }\n+    set startmsecs [clock clicks -milliseconds]\n+    set nextupdate [expr $startmsecs + 100]\n+    set ncmupdate 1\n+    set leftover {}\n+    fconfigure $commfd -blocking 0 -translation lf\n+    fileevent $commfd readable [list getcommitlines $commfd]\n+    . config -cursor watch\n+    settextcursor watch\n+}\n+\n proc showtag {tag isnew} {\n     global ctext cflist tagcontents tagids linknum\n \n@@ -3704,6 +3812,6 @@ set redisplaying 0\n set stuffsaved 0\n set patchnum 0\n setcoords\n-makewindow\n+makewindow $revtreeargs\n readrefs\n getcommits $revtreeargs\n---\n0.99.9.GIT\n"},{"id":"13039","messageId":"17294.58317.317337.145932@cargo.ozlabs.ibm.com","threadId":"2664","inReplyTo":"20051129211551.GF8383MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] gitk: add Update menu item.","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2005-12-01T11:51:41Z","receivedAt":"2005-12-01T11:51:41Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Sven Verdoolaege writes:\n\n> Update will redraw the commits if any commits have been added to any\n> of the selected heads.  The new commits appear on the top.\n\nI put this in although I'm not completely happy with it (though it is\na good step in the right direction).\n\nWhy do we unset children and nchildren in the phase == updatecommits\ncase?  Wouldn't it give the same result if we set ncleft to nchildren\nfor each commit and then we didn't call updatechildren in\nfinishcommits?  I think that would end up simpler.\n\nI tried removing some commits (using git reset --hard) and then doing\nselecting update from the menu, and it redrew everything, but the\nremoved commits were still shown.\n\nAlso, what will happen if the user selects update while gitk is still\ndrawing the graph?  I think that will cause havoc.  At _best_ we'll\nend up with a truncated list of commits AFAICS.  We need to make that\nrobust.\n\nPaul.\n"},{"id":"13043","messageId":"20051201130724.GV8383MdfPADPa@greensroom.kotnet.org","threadId":"2664","inReplyTo":"17294.58317.317337.145932@cargo.ozlabs.ibm.com","subject":"Re: [PATCH] gitk: add Update menu item.","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2005-12-01T13:07:24Z","receivedAt":"2005-12-01T13:07:24Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Thu, Dec 01, 2005 at 10:51:41PM +1100, Paul Mackerras wrote:\n> I put this in although I'm not completely happy with it (though it is\n> a good step in the right direction).\n\nThanks.  That's what it was meant to be (a step in the right direction).\n\n> Why do we unset children and nchildren in the phase == updatecommits\n> case?  Wouldn't it give the same result if we set ncleft to nchildren\n> for each commit and then we didn't call updatechildren in\n> finishcommits?  I think that would end up simpler.\n\nWell, you probably know your own code better than I do,\nbut I'll have a look later.\n\n> I tried removing some commits (using git reset --hard) and then doing\n> selecting update from the menu, and it redrew everything, but the\n> removed commits were still shown.\n\nHmmm...  I'll have look at this over the weekend (unless you beat\nme to it).\n\n> Also, what will happen if the user selects update while gitk is still\n> drawing the graph?  I think that will cause havoc.  At _best_ we'll\n> end up with a truncated list of commits AFAICS.  We need to make that\n> robust.\n\nAgreed.  I hadn't thought a user would do that, but that was just\nmy lack of imagination.\n\nskimo\n"},{"id":"13351","messageId":"81b0412b0512072352q6ceaee16l8599b12b56fa112f@mail.gmail.com","threadId":"2664","inReplyTo":"20051201130724.GV8383MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] gitk: add Update menu item.","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2005-12-08T07:52:42Z","receivedAt":"2005-12-08T07:52:42Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 12/1/05, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> > I tried removing some commits (using git reset --hard) and then doing\n> > selecting update from the menu, and it redrew everything, but the\n> > removed commits were still shown.\n>\n> Hmmm...  I'll have look at this over the weekend (unless you beat\n> me to it).\n\nAlso the removed references are not removed.\n"}]}