OLD | NEW |
1 # Copyright (C) 2009 Google Inc. All rights reserved. | 1 # Copyright (C) 2009 Google Inc. All rights reserved. |
2 # Copyright (C) 2009 Apple Inc. All rights reserved. | 2 # Copyright (C) 2009 Apple Inc. All rights reserved. |
3 # Copyright (C) 2011 Daniel Bates (dbates@intudata.com). All rights reserved. | 3 # Copyright (C) 2011 Daniel Bates (dbates@intudata.com). All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 def _remove(self, path): | 87 def _remove(self, path): |
88 self.fs.remove(path) | 88 self.fs.remove(path) |
89 | 89 |
90 def _rmtree(self, path): | 90 def _rmtree(self, path): |
91 self.fs.rmtree(path) | 91 self.fs.rmtree(path) |
92 | 92 |
93 def _run(self, *args, **kwargs): | 93 def _run(self, *args, **kwargs): |
94 return self.executive.run_command(*args, **kwargs) | 94 return self.executive.run_command(*args, **kwargs) |
95 | 95 |
96 def _run_silent(self, args, **kwargs): | 96 def _run_silent(self, args, **kwargs): |
97 self.executive.run_and_throw_if_fail(args, quiet=True, **kwargs) | 97 self.executive.run_command(args, **kwargs) |
98 | 98 |
99 def _write_text_file(self, path, contents): | 99 def _write_text_file(self, path, contents): |
100 self.fs.write_text_file(path, contents) | 100 self.fs.write_text_file(path, contents) |
101 | 101 |
102 def _write_binary_file(self, path, contents): | 102 def _write_binary_file(self, path, contents): |
103 self.fs.write_binary_file(path, contents) | 103 self.fs.write_binary_file(path, contents) |
104 | 104 |
105 def _make_diff(self, command, *args): | 105 def _make_diff(self, command, *args): |
106 # We use this wrapper to disable output decoding. diffs should be treate
d as | 106 # We use this wrapper to disable output decoding. diffs should be treate
d as |
107 # binary files since they may include text files of multiple differnet e
ncodings. | 107 # binary files since they may include text files of multiple differnet e
ncodings. |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 scm = self.make_scm() | 696 scm = self.make_scm() |
697 scm.find_checkout_root = lambda path: '' | 697 scm.find_checkout_root = lambda path: '' |
698 scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000' | 698 scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000' |
699 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-
02-08T08:05:49Z') | 699 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-
02-08T08:05:49Z') |
700 | 700 |
701 scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130' | 701 scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130' |
702 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-
02-07T23:32:03Z') | 702 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-
02-07T23:32:03Z') |
703 | 703 |
704 scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800' | 704 scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800' |
705 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-
02-08T09:55:21Z') | 705 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-
02-08T09:55:21Z') |
OLD | NEW |