OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 descriptor.git; | 5 library descriptor.git; |
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 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
11 import 'package:scheduled_test/descriptor.dart'; | 11 import 'package:scheduled_test/descriptor.dart'; |
12 | 12 |
13 import '../../../pub/git.dart' as git; | 13 import '../../lib/src/git.dart' as git; |
14 | 14 |
15 /// Describes a Git repository and its contents. | 15 /// Describes a Git repository and its contents. |
16 class GitRepoDescriptor extends DirectoryDescriptor { | 16 class GitRepoDescriptor extends DirectoryDescriptor { |
17 GitRepoDescriptor(String name, List<Descriptor> contents) | 17 GitRepoDescriptor(String name, List<Descriptor> contents) |
18 : super(name, contents); | 18 : super(name, contents); |
19 | 19 |
20 /// Creates the Git repository and commits the contents. | 20 /// Creates the Git repository and commits the contents. |
21 Future create([String parent]) => schedule(() { | 21 Future create([String parent]) => schedule(() { |
22 return super.create(parent).then((_) { | 22 return super.create(parent).then((_) { |
23 return _runGitCommands(parent, [ | 23 return _runGitCommands(parent, [ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 'GIT_COMMITTER_EMAIL': 'pub@dartlang.org' | 69 'GIT_COMMITTER_EMAIL': 'pub@dartlang.org' |
70 }; | 70 }; |
71 | 71 |
72 if (parent == null) parent = defaultRoot; | 72 if (parent == null) parent = defaultRoot; |
73 return git.run(args, | 73 return git.run(args, |
74 workingDir: path.join(parent, name), | 74 workingDir: path.join(parent, name), |
75 environment: environment); | 75 environment: environment); |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
OLD | NEW |