From: David Symonds Date: Tue, 1 May 2012 06:15:32 +0000 (+1000) Subject: misc/dashboard/codereview: preserve CL ordering. X-Git-Tag: go1.1rc2~3272 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cc9a5c3be7fb8c5935dbfa49b7926219674fa705;p=gostls13.git misc/dashboard/codereview: preserve CL ordering. R=r CC=golang-dev https://golang.org/cl/6136056 --- diff --git a/misc/dashboard/codereview/dashboard/front.go b/misc/dashboard/codereview/dashboard/front.go index 9eb36f3143..475a663516 100644 --- a/misc/dashboard/codereview/dashboard/front.go +++ b/misc/dashboard/codereview/dashboard/front.go @@ -78,7 +78,8 @@ func handleFront(w http.ResponseWriter, r *http.Request) { for i := len(tbl.CLs) - 1; i >= 0; i-- { cl := tbl.CLs[i] if cl.Author == currentPerson || cl.Reviewer == currentPerson { - tbl.CLs[i] = tbl.CLs[len(tbl.CLs)-1] + // Preserve order. + copy(tbl.CLs[i:], tbl.CLs[i+1:]) tbl.CLs = tbl.CLs[:len(tbl.CLs)-1] } }