OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # | 2 # |
3 # Copyright 2008-2009 Google Inc. All Rights Reserved. | 3 # Copyright 2008-2009 Google Inc. All Rights Reserved. |
4 # | 4 # |
5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
8 # | 8 # |
9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
10 # | 10 # |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 base_path = gclient_scm.os.path.join(self.root_dir, self.relpath) | 166 base_path = gclient_scm.os.path.join(self.root_dir, self.relpath) |
167 gclient_scm.os.path.isdir(base_path).AndReturn(True) | 167 gclient_scm.os.path.isdir(base_path).AndReturn(True) |
168 items = [ | 168 items = [ |
169 ('~ ', 'a'), | 169 ('~ ', 'a'), |
170 ] | 170 ] |
171 gclient_scm.scm.SVN.CaptureStatus(base_path).AndReturn(items) | 171 gclient_scm.scm.SVN.CaptureStatus(base_path).AndReturn(items) |
172 file_path = gclient_scm.os.path.join(base_path, 'a') | 172 file_path = gclient_scm.os.path.join(base_path, 'a') |
173 print(file_path) | 173 print(file_path) |
174 gclient_scm.os.path.exists(file_path).AndReturn(True) | 174 gclient_scm.os.path.exists(file_path).AndReturn(True) |
175 gclient_scm.os.path.isfile(file_path).AndReturn(False) | 175 gclient_scm.os.path.isfile(file_path).AndReturn(False) |
| 176 gclient_scm.os.path.islink(file_path).AndReturn(False) |
176 gclient_scm.os.path.isdir(file_path).AndReturn(True) | 177 gclient_scm.os.path.isdir(file_path).AndReturn(True) |
177 gclient_scm.gclient_utils.RemoveDirectory(file_path) | 178 gclient_scm.gclient_utils.RemoveDirectory(file_path) |
178 file_list1 = [] | 179 file_list1 = [] |
179 gclient_scm.scm.SVN.RunAndGetFileList(options, | 180 gclient_scm.scm.SVN.RunAndGetFileList(options, |
180 ['update', '--revision', 'BASE'], | 181 ['update', '--revision', 'BASE'], |
181 base_path, mox.IgnoreArg()) | 182 base_path, mox.IgnoreArg()) |
182 | 183 |
183 self.mox.ReplayAll() | 184 self.mox.ReplayAll() |
184 scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir, | 185 scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir, |
185 relpath=self.relpath) | 186 relpath=self.relpath) |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 relpath=self.relpath) | 532 relpath=self.relpath) |
532 rev_info = scm.revinfo(options, (), None) | 533 rev_info = scm.revinfo(options, (), None) |
533 self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458') | 534 self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458') |
534 | 535 |
535 | 536 |
536 if __name__ == '__main__': | 537 if __name__ == '__main__': |
537 import unittest | 538 import unittest |
538 unittest.main() | 539 unittest.main() |
539 | 540 |
540 # vim: ts=2:sw=2:tw=80:et: | 541 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |