Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: utils/pub/git_source.dart

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | utils/tests/string_encoding/benchmark_runner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library git_source; 5 library git_source;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:pathos/path.dart' as path; 9 import 'package:pathos/path.dart' as path;
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 /// 141 ///
142 /// If [mirror] is true, create a bare, mirrored clone. This doesn't check out 142 /// If [mirror] is true, create a bare, mirrored clone. This doesn't check out
143 /// the working tree, but instead makes the repository a local mirror of the 143 /// the working tree, but instead makes the repository a local mirror of the
144 /// remote repository. See the manpage for `git clone` for more information. 144 /// remote repository. See the manpage for `git clone` for more information.
145 Future _clone(String from, String to, {bool mirror: false}) { 145 Future _clone(String from, String to, {bool mirror: false}) {
146 return new Future.of(() { 146 return new Future.of(() {
147 // Git on Windows does not seem to automatically create the destination 147 // Git on Windows does not seem to automatically create the destination
148 // directory. 148 // directory.
149 ensureDir(to); 149 ensureDir(to);
150 var args = ["clone", from, to]; 150 var args = ["clone", from, to];
151 if (mirror) args.insertRange(1, 1, "--mirror"); 151 if (mirror) args.insert(1, "--mirror");
152 return git.run(args); 152 return git.run(args);
153 }).then((result) => null); 153 }).then((result) => null);
154 } 154 }
155 155
156 /// Checks out the reference [ref] in [repoPath]. 156 /// Checks out the reference [ref] in [repoPath].
157 Future _checkOut(String repoPath, String ref) { 157 Future _checkOut(String repoPath, String ref) {
158 return git.run(["checkout", ref], workingDir: repoPath).then( 158 return git.run(["checkout", ref], workingDir: repoPath).then(
159 (result) => null); 159 (result) => null);
160 } 160 }
161 161
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return description['ref']; 202 return description['ref'];
203 } 203 }
204 204
205 /// Returns [description] if it's a description, or [PackageId.description] if 205 /// Returns [description] if it's a description, or [PackageId.description] if
206 /// it's a [PackageId]. 206 /// it's a [PackageId].
207 _getDescription(description) { 207 _getDescription(description) {
208 if (description is PackageId) return description.description; 208 if (description is PackageId) return description.description;
209 return description; 209 return description;
210 } 210 }
211 } 211 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | utils/tests/string_encoding/benchmark_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698