]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dashboard/codereview: preserve CL ordering.
authorDavid Symonds <dsymonds@golang.org>
Tue, 1 May 2012 06:15:32 +0000 (16:15 +1000)
committerDavid Symonds <dsymonds@golang.org>
Tue, 1 May 2012 06:15:32 +0000 (16:15 +1000)
R=r
CC=golang-dev
https://golang.org/cl/6136056

misc/dashboard/codereview/dashboard/front.go

index 9eb36f31435f89692c8b136c2025c2ca98bb005a..475a663516c2244a0ecc459826d05a59d8cc763c 100644 (file)
@@ -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]
                                }
                        }