Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(126)

Delta Between Two Patch Sets: src/cmd/hgpatch/main.go

Issue 4631098: code review 4631098: sort: rename helpers: s/Sort// in sort.Sort[Float64s|In... (Closed)
Left Patch Set: Created 12 years, 8 months ago
Right Patch Set: diff -r e276ba524959 https://go.googlecode.com/hg/ Created 12 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/gofix/sorthelpers_test.go ('k') | src/pkg/exp/template/exec_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "container/vector" 9 "container/vector"
10 "exec" 10 "exec"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 } 170 }
171 171
172 // Finished editing files. Write the list of changed files to stdout. 172 // Finished editing files. Write the list of changed files to stdout.
173 list := make([]string, len(changed)) 173 list := make([]string, len(changed))
174 i := 0 174 i := 0
175 for f := range changed { 175 for f := range changed {
176 list[i] = f 176 list[i] = f
177 i++ 177 i++
178 } 178 }
179 » sort.SortStrings(list) 179 » sort.Strings(list)
180 for _, f := range list { 180 for _, f := range list {
181 fmt.Printf("%s\n", f) 181 fmt.Printf("%s\n", f)
182 } 182 }
183 } 183 }
184 184
185 185
186 // make parent directory for name, if necessary 186 // make parent directory for name, if necessary
187 func makeParent(name string) { 187 func makeParent(name string) {
188 parent, _ := filepath.Split(name) 188 parent, _ := filepath.Split(name)
189 chk(mkdirAll(parent, 0755)) 189 chk(mkdirAll(parent, 0755))
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 return string(bs), nil 352 return string(bs), nil
353 } 353 }
354 354
355 // A runError represents an error that occurred while running a command. 355 // A runError represents an error that occurred while running a command.
356 type runError struct { 356 type runError struct {
357 cmd []string 357 cmd []string
358 err os.Error 358 err os.Error
359 } 359 }
360 360
361 func (e *runError) String() string { return strings.Join(e.cmd, " ") + ": " + e. err.String() } 361 func (e *runError) String() string { return strings.Join(e.cmd, " ") + ": " + e. err.String() }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b